@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,715 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
repo-map.py — Aider 風のリポジトリ全体シンボル抽出 CLI
|
|
4
|
+
|
|
5
|
+
リポ全体を走査し、主要な定義シンボル(class/def/export/function 等)だけを
|
|
6
|
+
抽出して LLM コンテキストに注入できる Markdown / YAML / JSON サマリを生成する。
|
|
7
|
+
|
|
8
|
+
設計:
|
|
9
|
+
- 標準ライブラリのみ (Python 3.9+)
|
|
10
|
+
- 依存ライブラリなし、ast / re / pathlib / fnmatch / json / argparse のみ
|
|
11
|
+
- .gitignore を尊重 (ルートと配下の .gitignore を反映する簡易実装)
|
|
12
|
+
- 重要度ランキングで上限 byte に truncate
|
|
13
|
+
|
|
14
|
+
使い方:
|
|
15
|
+
python3 .claude/skills/repo-map/repo-map.py [path] [options]
|
|
16
|
+
|
|
17
|
+
Options:
|
|
18
|
+
--max-bytes N 出力上限 byte (default: 50000)
|
|
19
|
+
--format FORMAT markdown | yaml | json (default: markdown)
|
|
20
|
+
--language LANGS カンマ区切り (default: python,typescript,javascript,bash)
|
|
21
|
+
--include GLOB 追加で含める glob (繰り返し可)
|
|
22
|
+
--exclude GLOB 追加で除外する glob (繰り返し可)
|
|
23
|
+
--no-gitignore .gitignore を読まない
|
|
24
|
+
--debug stderr にスキャン詳細出力
|
|
25
|
+
|
|
26
|
+
抽出シンボル:
|
|
27
|
+
Python: class / def / async def / 型エイリアス (X = Y[Z]/PEP 695 type)
|
|
28
|
+
TS / JS: export class/function/const/let/var, interface, type, enum, default
|
|
29
|
+
Bash: function 定義 (foo() / function foo / source/. )
|
|
30
|
+
|
|
31
|
+
Exit codes:
|
|
32
|
+
0 成功
|
|
33
|
+
2 指定 path が存在しない / 解析対象 0 件
|
|
34
|
+
"""
|
|
35
|
+
from __future__ import annotations
|
|
36
|
+
|
|
37
|
+
import argparse
|
|
38
|
+
import ast
|
|
39
|
+
import fnmatch
|
|
40
|
+
import json
|
|
41
|
+
import os
|
|
42
|
+
import re
|
|
43
|
+
import sys
|
|
44
|
+
from dataclasses import dataclass, field
|
|
45
|
+
from pathlib import Path
|
|
46
|
+
from typing import Sequence
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# ------------------------- 設定 -------------------------
|
|
50
|
+
|
|
51
|
+
DEFAULT_MAX_BYTES = 50_000
|
|
52
|
+
DEFAULT_LANGUAGES = ("python", "typescript", "javascript", "bash")
|
|
53
|
+
|
|
54
|
+
# 言語 → 拡張子
|
|
55
|
+
LANGUAGE_EXTENSIONS: dict[str, tuple[str, ...]] = {
|
|
56
|
+
"python": (".py",),
|
|
57
|
+
"typescript": (".ts", ".tsx", ".mts", ".cts"),
|
|
58
|
+
"javascript": (".js", ".jsx", ".mjs", ".cjs"),
|
|
59
|
+
"bash": (".sh", ".bash"),
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
# 既定で除外するディレクトリ (.gitignore に依らず常時)
|
|
63
|
+
HARD_EXCLUDED_DIRS = {
|
|
64
|
+
"node_modules",
|
|
65
|
+
".venv",
|
|
66
|
+
"venv",
|
|
67
|
+
"env",
|
|
68
|
+
".env",
|
|
69
|
+
"dist",
|
|
70
|
+
"build",
|
|
71
|
+
"out",
|
|
72
|
+
".next",
|
|
73
|
+
".turbo",
|
|
74
|
+
"target",
|
|
75
|
+
".git",
|
|
76
|
+
".cache",
|
|
77
|
+
"__pycache__",
|
|
78
|
+
".pytest_cache",
|
|
79
|
+
".mypy_cache",
|
|
80
|
+
".ruff_cache",
|
|
81
|
+
".tox",
|
|
82
|
+
".idea",
|
|
83
|
+
".vscode",
|
|
84
|
+
"coverage",
|
|
85
|
+
".coverage",
|
|
86
|
+
".nyc_output",
|
|
87
|
+
".nuxt",
|
|
88
|
+
".svelte-kit",
|
|
89
|
+
".astro",
|
|
90
|
+
".parcel-cache",
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# 既定で除外するファイル glob
|
|
94
|
+
HARD_EXCLUDED_GLOBS = (
|
|
95
|
+
"*.min.js",
|
|
96
|
+
"*.min.css",
|
|
97
|
+
"*.map",
|
|
98
|
+
"*.lock",
|
|
99
|
+
"*-lock.json",
|
|
100
|
+
"*.snap",
|
|
101
|
+
"*.d.ts",
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
# シンボル種別 → 重要度の重み (高いほど優先)
|
|
105
|
+
KIND_WEIGHTS: dict[str, int] = {
|
|
106
|
+
"class": 10,
|
|
107
|
+
"interface": 9,
|
|
108
|
+
"type": 7,
|
|
109
|
+
"enum": 8,
|
|
110
|
+
"function": 6,
|
|
111
|
+
"method": 4,
|
|
112
|
+
"const": 3,
|
|
113
|
+
"type-alias": 5,
|
|
114
|
+
"default-export": 9,
|
|
115
|
+
"source": 1,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# ------------------------- データ -------------------------
|
|
120
|
+
|
|
121
|
+
@dataclass
|
|
122
|
+
class Symbol:
|
|
123
|
+
name: str
|
|
124
|
+
kind: str
|
|
125
|
+
line: int
|
|
126
|
+
exported: bool = False
|
|
127
|
+
extra: str = ""
|
|
128
|
+
|
|
129
|
+
def importance(self) -> int:
|
|
130
|
+
base = KIND_WEIGHTS.get(self.kind, 1)
|
|
131
|
+
if self.exported:
|
|
132
|
+
base += 3
|
|
133
|
+
if len(self.name) <= 1:
|
|
134
|
+
base -= 2
|
|
135
|
+
return base
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
@dataclass
|
|
139
|
+
class FileEntry:
|
|
140
|
+
path: str # repo root からの相対 path (POSIX)
|
|
141
|
+
language: str
|
|
142
|
+
symbols: list[Symbol] = field(default_factory=list)
|
|
143
|
+
|
|
144
|
+
def importance(self) -> int:
|
|
145
|
+
if not self.symbols:
|
|
146
|
+
return 0
|
|
147
|
+
total = sum(s.importance() for s in self.symbols)
|
|
148
|
+
bonus = 0
|
|
149
|
+
name = Path(self.path).name.lower()
|
|
150
|
+
if name in ("__init__.py", "index.ts", "index.js", "main.py", "main.ts", "cli.py"):
|
|
151
|
+
bonus += 5
|
|
152
|
+
if "test" in name or "spec" in name:
|
|
153
|
+
bonus -= 3
|
|
154
|
+
return total + bonus
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
# ------------------------- .gitignore 簡易実装 -------------------------
|
|
158
|
+
|
|
159
|
+
class GitignoreMatcher:
|
|
160
|
+
"""ルート + 配下の .gitignore を集約した簡易マッチャ。"""
|
|
161
|
+
|
|
162
|
+
def __init__(self, root: Path, enabled: bool = True) -> None:
|
|
163
|
+
self.root = root
|
|
164
|
+
self.enabled = enabled
|
|
165
|
+
self._patterns: list[tuple[Path, str, bool, bool]] = []
|
|
166
|
+
if enabled:
|
|
167
|
+
self._load_all()
|
|
168
|
+
|
|
169
|
+
def _load_all(self) -> None:
|
|
170
|
+
for gi in self.root.rglob(".gitignore"):
|
|
171
|
+
if any(p in HARD_EXCLUDED_DIRS for p in gi.relative_to(self.root).parts):
|
|
172
|
+
continue
|
|
173
|
+
self._load(gi)
|
|
174
|
+
|
|
175
|
+
def _load(self, gi_path: Path) -> None:
|
|
176
|
+
base = gi_path.parent
|
|
177
|
+
try:
|
|
178
|
+
text = gi_path.read_text(encoding="utf-8", errors="ignore")
|
|
179
|
+
except OSError:
|
|
180
|
+
return
|
|
181
|
+
for raw in text.splitlines():
|
|
182
|
+
line = raw.strip()
|
|
183
|
+
if not line or line.startswith("#"):
|
|
184
|
+
continue
|
|
185
|
+
negate = line.startswith("!")
|
|
186
|
+
if negate:
|
|
187
|
+
line = line[1:]
|
|
188
|
+
dir_only = line.endswith("/")
|
|
189
|
+
line = line.rstrip("/")
|
|
190
|
+
self._patterns.append((base, line, negate, dir_only))
|
|
191
|
+
|
|
192
|
+
def is_ignored(self, abs_path: Path, is_dir: bool) -> bool:
|
|
193
|
+
if not self.enabled or not self._patterns:
|
|
194
|
+
return False
|
|
195
|
+
try:
|
|
196
|
+
abs_path.relative_to(self.root)
|
|
197
|
+
except ValueError:
|
|
198
|
+
return False
|
|
199
|
+
ignored = False
|
|
200
|
+
for base, pattern, negate, dir_only in self._patterns:
|
|
201
|
+
if dir_only and not is_dir:
|
|
202
|
+
continue
|
|
203
|
+
try:
|
|
204
|
+
rel_to_base = abs_path.relative_to(base).as_posix()
|
|
205
|
+
except ValueError:
|
|
206
|
+
continue
|
|
207
|
+
if self._match(pattern, rel_to_base):
|
|
208
|
+
ignored = not negate
|
|
209
|
+
return ignored
|
|
210
|
+
|
|
211
|
+
@staticmethod
|
|
212
|
+
def _match(pattern: str, rel_to_base: str) -> bool:
|
|
213
|
+
if pattern.startswith("/"):
|
|
214
|
+
p = pattern.lstrip("/")
|
|
215
|
+
return fnmatch.fnmatchcase(rel_to_base, p) or rel_to_base.startswith(p + "/")
|
|
216
|
+
if "**" in pattern:
|
|
217
|
+
regex = _gitignore_glob_to_regex(pattern)
|
|
218
|
+
return bool(regex.match(rel_to_base)) or bool(regex.search(rel_to_base))
|
|
219
|
+
if "/" in pattern:
|
|
220
|
+
return (
|
|
221
|
+
fnmatch.fnmatchcase(rel_to_base, pattern)
|
|
222
|
+
or rel_to_base.startswith(pattern + "/")
|
|
223
|
+
)
|
|
224
|
+
return any(
|
|
225
|
+
fnmatch.fnmatchcase(part, pattern) for part in rel_to_base.split("/")
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def _gitignore_glob_to_regex(pattern: str) -> "re.Pattern[str]":
|
|
230
|
+
out: list[str] = []
|
|
231
|
+
i = 0
|
|
232
|
+
while i < len(pattern):
|
|
233
|
+
c = pattern[i]
|
|
234
|
+
if c == "*" and i + 1 < len(pattern) and pattern[i + 1] == "*":
|
|
235
|
+
out.append(".*")
|
|
236
|
+
i += 2
|
|
237
|
+
if i < len(pattern) and pattern[i] == "/":
|
|
238
|
+
i += 1
|
|
239
|
+
elif c == "*":
|
|
240
|
+
out.append("[^/]*")
|
|
241
|
+
i += 1
|
|
242
|
+
elif c == "?":
|
|
243
|
+
out.append("[^/]")
|
|
244
|
+
i += 1
|
|
245
|
+
elif c in ".^$+(){}|\\":
|
|
246
|
+
out.append("\\" + c)
|
|
247
|
+
i += 1
|
|
248
|
+
else:
|
|
249
|
+
out.append(c)
|
|
250
|
+
i += 1
|
|
251
|
+
return re.compile("^" + "".join(out) + "$")
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
# ------------------------- 言語別 抽出 -------------------------
|
|
255
|
+
|
|
256
|
+
def language_of(path: Path, languages: set[str]) -> str | None:
|
|
257
|
+
suffix = path.suffix.lower()
|
|
258
|
+
for lang, exts in LANGUAGE_EXTENSIONS.items():
|
|
259
|
+
if lang not in languages:
|
|
260
|
+
continue
|
|
261
|
+
if suffix in exts:
|
|
262
|
+
return lang
|
|
263
|
+
return None
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
def extract_symbols(path: Path, language: str, debug: bool = False) -> list[Symbol]:
|
|
267
|
+
try:
|
|
268
|
+
text = path.read_text(encoding="utf-8", errors="ignore")
|
|
269
|
+
except OSError as exc:
|
|
270
|
+
if debug:
|
|
271
|
+
print(f"[repo-map] read fail {path}: {exc}", file=sys.stderr)
|
|
272
|
+
return []
|
|
273
|
+
if language == "python":
|
|
274
|
+
return _extract_python(text, path, debug)
|
|
275
|
+
if language in ("typescript", "javascript"):
|
|
276
|
+
return _extract_ts_js(text)
|
|
277
|
+
if language == "bash":
|
|
278
|
+
return _extract_bash(text)
|
|
279
|
+
return []
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# ---- Python ----
|
|
283
|
+
|
|
284
|
+
def _extract_python(text: str, path: Path, debug: bool) -> list[Symbol]:
|
|
285
|
+
out: list[Symbol] = []
|
|
286
|
+
try:
|
|
287
|
+
tree = ast.parse(text)
|
|
288
|
+
except SyntaxError:
|
|
289
|
+
if debug:
|
|
290
|
+
print(f"[repo-map] python parse fail: {path}", file=sys.stderr)
|
|
291
|
+
return _python_fallback_regex(text)
|
|
292
|
+
for node in tree.body:
|
|
293
|
+
out.extend(_python_top_level(node))
|
|
294
|
+
return out
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def _python_top_level(node: ast.AST) -> list[Symbol]:
|
|
298
|
+
out: list[Symbol] = []
|
|
299
|
+
if isinstance(node, ast.ClassDef):
|
|
300
|
+
line = node.lineno
|
|
301
|
+
out.append(Symbol(name=node.name, kind="class", line=line, exported=not node.name.startswith("_")))
|
|
302
|
+
for child in node.body:
|
|
303
|
+
if isinstance(child, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
304
|
+
out.append(
|
|
305
|
+
Symbol(
|
|
306
|
+
name=f"{node.name}.{child.name}",
|
|
307
|
+
kind="method",
|
|
308
|
+
line=child.lineno,
|
|
309
|
+
exported=not child.name.startswith("_"),
|
|
310
|
+
)
|
|
311
|
+
)
|
|
312
|
+
elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
313
|
+
out.append(
|
|
314
|
+
Symbol(
|
|
315
|
+
name=node.name,
|
|
316
|
+
kind="function",
|
|
317
|
+
line=node.lineno,
|
|
318
|
+
exported=not node.name.startswith("_"),
|
|
319
|
+
)
|
|
320
|
+
)
|
|
321
|
+
elif isinstance(node, ast.Assign):
|
|
322
|
+
for target in node.targets:
|
|
323
|
+
if isinstance(target, ast.Name):
|
|
324
|
+
name = target.id
|
|
325
|
+
if name.isupper() or (name[0].isupper() and not name.startswith("_")):
|
|
326
|
+
kind = "type-alias" if name[0].isupper() else "const"
|
|
327
|
+
out.append(Symbol(name=name, kind=kind, line=node.lineno, exported=not name.startswith("_")))
|
|
328
|
+
elif isinstance(node, ast.AnnAssign) and isinstance(node.target, ast.Name):
|
|
329
|
+
name = node.target.id
|
|
330
|
+
if name.isupper() or (name[0].isupper() and not name.startswith("_")):
|
|
331
|
+
out.append(
|
|
332
|
+
Symbol(name=name, kind="type-alias" if name[0].isupper() else "const",
|
|
333
|
+
line=node.lineno, exported=not name.startswith("_"))
|
|
334
|
+
)
|
|
335
|
+
type_alias_cls = getattr(ast, "TypeAlias", None)
|
|
336
|
+
if type_alias_cls is not None and isinstance(node, type_alias_cls):
|
|
337
|
+
target = node.name
|
|
338
|
+
name = getattr(target, "id", str(target))
|
|
339
|
+
out.append(Symbol(name=name, kind="type-alias", line=node.lineno, exported=not name.startswith("_")))
|
|
340
|
+
return out
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
_PY_FALLBACK_RE = re.compile(
|
|
344
|
+
r"^(?P<indent>[ \t]*)(?:async\s+)?(?P<kind>def|class)\s+(?P<name>[A-Za-z_][A-Za-z0-9_]*)",
|
|
345
|
+
re.MULTILINE,
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
def _python_fallback_regex(text: str) -> list[Symbol]:
|
|
350
|
+
out: list[Symbol] = []
|
|
351
|
+
for m in _PY_FALLBACK_RE.finditer(text):
|
|
352
|
+
if m.group("indent"):
|
|
353
|
+
continue
|
|
354
|
+
kind = "class" if m.group("kind") == "class" else "function"
|
|
355
|
+
name = m.group("name")
|
|
356
|
+
out.append(
|
|
357
|
+
Symbol(
|
|
358
|
+
name=name,
|
|
359
|
+
kind=kind,
|
|
360
|
+
line=text.count("\n", 0, m.start()) + 1,
|
|
361
|
+
exported=not name.startswith("_"),
|
|
362
|
+
)
|
|
363
|
+
)
|
|
364
|
+
return out
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
# ---- TypeScript / JavaScript ----
|
|
368
|
+
|
|
369
|
+
_TS_PATTERNS: tuple[tuple[str, "re.Pattern[str]"], ...] = (
|
|
370
|
+
(
|
|
371
|
+
"default-export",
|
|
372
|
+
re.compile(
|
|
373
|
+
r"^export\s+default\s+(?:async\s+)?(?:function\s*\*?\s*([A-Za-z_$][A-Za-z0-9_$]*)?|class\s+([A-Za-z_$][A-Za-z0-9_$]*)?)",
|
|
374
|
+
re.MULTILINE,
|
|
375
|
+
),
|
|
376
|
+
),
|
|
377
|
+
(
|
|
378
|
+
"interface",
|
|
379
|
+
re.compile(
|
|
380
|
+
r"^(export\s+)?interface\s+([A-Za-z_$][A-Za-z0-9_$]*)",
|
|
381
|
+
re.MULTILINE,
|
|
382
|
+
),
|
|
383
|
+
),
|
|
384
|
+
(
|
|
385
|
+
"type",
|
|
386
|
+
re.compile(
|
|
387
|
+
r"^(export\s+)?type\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*[=<]",
|
|
388
|
+
re.MULTILINE,
|
|
389
|
+
),
|
|
390
|
+
),
|
|
391
|
+
(
|
|
392
|
+
"enum",
|
|
393
|
+
re.compile(
|
|
394
|
+
r"^(export\s+)?(?:const\s+)?enum\s+([A-Za-z_$][A-Za-z0-9_$]*)",
|
|
395
|
+
re.MULTILINE,
|
|
396
|
+
),
|
|
397
|
+
),
|
|
398
|
+
(
|
|
399
|
+
"class",
|
|
400
|
+
re.compile(
|
|
401
|
+
r"^(export\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][A-Za-z0-9_$]*)",
|
|
402
|
+
re.MULTILINE,
|
|
403
|
+
),
|
|
404
|
+
),
|
|
405
|
+
(
|
|
406
|
+
"function",
|
|
407
|
+
re.compile(
|
|
408
|
+
r"^(export\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][A-Za-z0-9_$]*)",
|
|
409
|
+
re.MULTILINE,
|
|
410
|
+
),
|
|
411
|
+
),
|
|
412
|
+
(
|
|
413
|
+
"const",
|
|
414
|
+
re.compile(
|
|
415
|
+
r"^(export\s+)?(?:const|let|var)\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*[:=]",
|
|
416
|
+
re.MULTILINE,
|
|
417
|
+
),
|
|
418
|
+
),
|
|
419
|
+
)
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
def _extract_ts_js(text: str) -> list[Symbol]:
|
|
423
|
+
out: list[Symbol] = []
|
|
424
|
+
seen: set[tuple[str, int]] = set()
|
|
425
|
+
for kind, pattern in _TS_PATTERNS:
|
|
426
|
+
for m in pattern.finditer(text):
|
|
427
|
+
groups = m.groups()
|
|
428
|
+
if kind == "default-export":
|
|
429
|
+
name = (groups[0] or groups[1] or "default").strip() if groups else "default"
|
|
430
|
+
exported = True
|
|
431
|
+
else:
|
|
432
|
+
exported = bool(groups[0])
|
|
433
|
+
name = (groups[1] or "").strip()
|
|
434
|
+
if not name:
|
|
435
|
+
continue
|
|
436
|
+
line = text.count("\n", 0, m.start()) + 1
|
|
437
|
+
key = (name, line)
|
|
438
|
+
if key in seen:
|
|
439
|
+
continue
|
|
440
|
+
seen.add(key)
|
|
441
|
+
if kind == "const" and name in {"from", "as", "of", "in"}:
|
|
442
|
+
continue
|
|
443
|
+
out.append(Symbol(name=name, kind=kind, line=line, exported=exported))
|
|
444
|
+
return out
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
# ---- Bash ----
|
|
448
|
+
|
|
449
|
+
_BASH_FUNC_RE = re.compile(
|
|
450
|
+
r"^(?:function\s+([A-Za-z_][A-Za-z0-9_]*)\s*(?:\(\s*\))?|([A-Za-z_][A-Za-z0-9_]*)\s*\(\s*\))\s*\{?",
|
|
451
|
+
re.MULTILINE,
|
|
452
|
+
)
|
|
453
|
+
_BASH_SOURCE_RE = re.compile(r"^\s*(?:source|\.)\s+([^\s#]+)", re.MULTILINE)
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
def _extract_bash(text: str) -> list[Symbol]:
|
|
457
|
+
out: list[Symbol] = []
|
|
458
|
+
for m in _BASH_FUNC_RE.finditer(text):
|
|
459
|
+
name = m.group(1) or m.group(2)
|
|
460
|
+
if not name:
|
|
461
|
+
continue
|
|
462
|
+
line = text.count("\n", 0, m.start()) + 1
|
|
463
|
+
out.append(Symbol(name=name, kind="function", line=line, exported=True))
|
|
464
|
+
for m in _BASH_SOURCE_RE.finditer(text):
|
|
465
|
+
target = m.group(1).strip().strip("\"'")
|
|
466
|
+
line = text.count("\n", 0, m.start()) + 1
|
|
467
|
+
out.append(Symbol(name=target, kind="source", line=line, exported=False))
|
|
468
|
+
return out
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
# ------------------------- スキャン -------------------------
|
|
472
|
+
|
|
473
|
+
def scan_repo(
|
|
474
|
+
root: Path,
|
|
475
|
+
languages: set[str],
|
|
476
|
+
extra_includes: Sequence[str],
|
|
477
|
+
extra_excludes: Sequence[str],
|
|
478
|
+
use_gitignore: bool,
|
|
479
|
+
debug: bool,
|
|
480
|
+
) -> list[FileEntry]:
|
|
481
|
+
matcher = GitignoreMatcher(root, enabled=use_gitignore)
|
|
482
|
+
entries: list[FileEntry] = []
|
|
483
|
+
for current_root, dirs, files in os.walk(root):
|
|
484
|
+
cur_path = Path(current_root)
|
|
485
|
+
dirs[:] = [
|
|
486
|
+
d for d in dirs
|
|
487
|
+
if d not in HARD_EXCLUDED_DIRS
|
|
488
|
+
and not _is_extra_excluded(cur_path / d, root, extra_excludes)
|
|
489
|
+
and not matcher.is_ignored(cur_path / d, is_dir=True)
|
|
490
|
+
]
|
|
491
|
+
for fname in files:
|
|
492
|
+
fpath = cur_path / fname
|
|
493
|
+
if any(fnmatch.fnmatchcase(fname, g) for g in HARD_EXCLUDED_GLOBS):
|
|
494
|
+
continue
|
|
495
|
+
if _is_extra_excluded(fpath, root, extra_excludes):
|
|
496
|
+
continue
|
|
497
|
+
if matcher.is_ignored(fpath, is_dir=False):
|
|
498
|
+
if not _matches_any(fpath, root, extra_includes):
|
|
499
|
+
continue
|
|
500
|
+
lang = language_of(fpath, languages)
|
|
501
|
+
if lang is None:
|
|
502
|
+
continue
|
|
503
|
+
symbols = extract_symbols(fpath, lang, debug=debug)
|
|
504
|
+
if not symbols:
|
|
505
|
+
continue
|
|
506
|
+
try:
|
|
507
|
+
rel = fpath.relative_to(root).as_posix()
|
|
508
|
+
except ValueError:
|
|
509
|
+
rel = str(fpath)
|
|
510
|
+
entries.append(FileEntry(path=rel, language=lang, symbols=symbols))
|
|
511
|
+
return entries
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
def _matches_any(path: Path, root: Path, globs: Sequence[str]) -> bool:
|
|
515
|
+
if not globs:
|
|
516
|
+
return False
|
|
517
|
+
try:
|
|
518
|
+
rel = path.relative_to(root).as_posix()
|
|
519
|
+
except ValueError:
|
|
520
|
+
rel = str(path)
|
|
521
|
+
return any(fnmatch.fnmatchcase(rel, g) or fnmatch.fnmatchcase(path.name, g) for g in globs)
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
def _is_extra_excluded(path: Path, root: Path, excludes: Sequence[str]) -> bool:
|
|
525
|
+
return _matches_any(path, root, excludes)
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
# ------------------------- ランキング & truncate -------------------------
|
|
529
|
+
|
|
530
|
+
def rank_and_truncate(
|
|
531
|
+
entries: list[FileEntry], max_bytes: int, fmt: str
|
|
532
|
+
) -> tuple[list[FileEntry], int, int]:
|
|
533
|
+
total_files = len(entries)
|
|
534
|
+
total_symbols = sum(len(e.symbols) for e in entries)
|
|
535
|
+
sorted_entries = sorted(entries, key=lambda e: e.importance(), reverse=True)
|
|
536
|
+
picked: list[FileEntry] = []
|
|
537
|
+
running = _format_overhead_bytes(fmt)
|
|
538
|
+
for entry in sorted_entries:
|
|
539
|
+
rendered = _render_entry(entry, fmt)
|
|
540
|
+
size = len(rendered.encode("utf-8"))
|
|
541
|
+
if running + size > max_bytes and picked:
|
|
542
|
+
break
|
|
543
|
+
picked.append(entry)
|
|
544
|
+
running += size
|
|
545
|
+
picked.sort(key=lambda e: e.path)
|
|
546
|
+
return picked, total_files, total_symbols
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
def _format_overhead_bytes(fmt: str) -> int:
|
|
550
|
+
return 600
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
# ------------------------- レンダリング -------------------------
|
|
554
|
+
|
|
555
|
+
def render(
|
|
556
|
+
entries: list[FileEntry],
|
|
557
|
+
fmt: str,
|
|
558
|
+
root: Path,
|
|
559
|
+
total_files: int,
|
|
560
|
+
total_symbols: int,
|
|
561
|
+
truncated: bool,
|
|
562
|
+
) -> str:
|
|
563
|
+
if fmt == "json":
|
|
564
|
+
return _render_json(entries, root, total_files, total_symbols, truncated)
|
|
565
|
+
if fmt == "yaml":
|
|
566
|
+
return _render_yaml(entries, root, total_files, total_symbols, truncated)
|
|
567
|
+
return _render_markdown(entries, root, total_files, total_symbols, truncated)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
def _render_entry(entry: FileEntry, fmt: str) -> str:
|
|
571
|
+
if fmt == "json":
|
|
572
|
+
return json.dumps(_entry_dict(entry), ensure_ascii=False) + ",\n"
|
|
573
|
+
if fmt == "yaml":
|
|
574
|
+
lines = [f" - path: {entry.path}", f" language: {entry.language}", " symbols:"]
|
|
575
|
+
for s in entry.symbols:
|
|
576
|
+
lines.append(
|
|
577
|
+
f" - {{name: {_yaml_safe(s.name)}, kind: {s.kind}, line: {s.line}, exported: {str(s.exported).lower()}}}"
|
|
578
|
+
)
|
|
579
|
+
return "\n".join(lines) + "\n"
|
|
580
|
+
out = [f"### `{entry.path}` ({entry.language})", ""]
|
|
581
|
+
out.append("| Kind | Name | Line | Exported |")
|
|
582
|
+
out.append("|------|------|-----:|:--------:|")
|
|
583
|
+
for s in entry.symbols:
|
|
584
|
+
out.append(f"| {s.kind} | `{s.name}` | {s.line} | {'Y' if s.exported else ' '} |")
|
|
585
|
+
out.append("")
|
|
586
|
+
return "\n".join(out) + "\n"
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
def _entry_dict(entry: FileEntry) -> dict:
|
|
590
|
+
return {
|
|
591
|
+
"path": entry.path,
|
|
592
|
+
"language": entry.language,
|
|
593
|
+
"symbols": [
|
|
594
|
+
{"name": s.name, "kind": s.kind, "line": s.line, "exported": s.exported}
|
|
595
|
+
for s in entry.symbols
|
|
596
|
+
],
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
def _yaml_safe(value: str) -> str:
|
|
601
|
+
if re.match(r"^[A-Za-z_][A-Za-z0-9_.\-]*$", value):
|
|
602
|
+
return value
|
|
603
|
+
escaped = value.replace("\\", "\\\\").replace('"', '\\"')
|
|
604
|
+
return f'"{escaped}"'
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
def _render_markdown(
|
|
608
|
+
entries: list[FileEntry], root: Path, total_files: int, total_symbols: int, truncated: bool
|
|
609
|
+
) -> str:
|
|
610
|
+
header = [
|
|
611
|
+
f"# Repo Map — `{root.name}`",
|
|
612
|
+
"",
|
|
613
|
+
f"- Files scanned: **{total_files}**",
|
|
614
|
+
f"- Symbols extracted: **{total_symbols}**",
|
|
615
|
+
f"- Files in this map: **{len(entries)}**",
|
|
616
|
+
f"- Truncated: **{'yes' if truncated else 'no'}**",
|
|
617
|
+
"",
|
|
618
|
+
"Generated by `.claude/skills/repo-map/repo-map.py`.",
|
|
619
|
+
"",
|
|
620
|
+
]
|
|
621
|
+
body = [_render_entry(e, "markdown") for e in entries]
|
|
622
|
+
return "\n".join(header) + "\n".join(body)
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
def _render_yaml(
|
|
626
|
+
entries: list[FileEntry], root: Path, total_files: int, total_symbols: int, truncated: bool
|
|
627
|
+
) -> str:
|
|
628
|
+
out = [
|
|
629
|
+
f"repo: {root.name}",
|
|
630
|
+
f"files_scanned: {total_files}",
|
|
631
|
+
f"symbols_extracted: {total_symbols}",
|
|
632
|
+
f"files_in_map: {len(entries)}",
|
|
633
|
+
f"truncated: {'true' if truncated else 'false'}",
|
|
634
|
+
"entries:",
|
|
635
|
+
]
|
|
636
|
+
for e in entries:
|
|
637
|
+
out.append(_render_entry(e, "yaml").rstrip("\n"))
|
|
638
|
+
return "\n".join(out) + "\n"
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
def _render_json(
|
|
642
|
+
entries: list[FileEntry], root: Path, total_files: int, total_symbols: int, truncated: bool
|
|
643
|
+
) -> str:
|
|
644
|
+
payload = {
|
|
645
|
+
"repo": root.name,
|
|
646
|
+
"files_scanned": total_files,
|
|
647
|
+
"symbols_extracted": total_symbols,
|
|
648
|
+
"files_in_map": len(entries),
|
|
649
|
+
"truncated": truncated,
|
|
650
|
+
"entries": [_entry_dict(e) for e in entries],
|
|
651
|
+
}
|
|
652
|
+
return json.dumps(payload, ensure_ascii=False, indent=2) + "\n"
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
# ------------------------- main -------------------------
|
|
656
|
+
|
|
657
|
+
def parse_args(argv: Sequence[str]) -> argparse.Namespace:
|
|
658
|
+
p = argparse.ArgumentParser(
|
|
659
|
+
prog="repo-map",
|
|
660
|
+
description="Aider 風のリポジトリ全体シンボル抽出 CLI",
|
|
661
|
+
)
|
|
662
|
+
p.add_argument("path", nargs="?", default=".", help="対象ルート (default: cwd)")
|
|
663
|
+
p.add_argument("--max-bytes", type=int, default=DEFAULT_MAX_BYTES, help="出力上限 byte")
|
|
664
|
+
p.add_argument(
|
|
665
|
+
"--format",
|
|
666
|
+
choices=("markdown", "yaml", "json"),
|
|
667
|
+
default="markdown",
|
|
668
|
+
help="出力形式 (default: markdown)",
|
|
669
|
+
)
|
|
670
|
+
p.add_argument(
|
|
671
|
+
"--language",
|
|
672
|
+
default=",".join(DEFAULT_LANGUAGES),
|
|
673
|
+
help=f"カンマ区切り (default: {','.join(DEFAULT_LANGUAGES)})",
|
|
674
|
+
)
|
|
675
|
+
p.add_argument("--include", action="append", default=[], help="追加で含める glob")
|
|
676
|
+
p.add_argument("--exclude", action="append", default=[], help="追加で除外する glob")
|
|
677
|
+
p.add_argument("--no-gitignore", action="store_true", help=".gitignore を読まない")
|
|
678
|
+
p.add_argument("--debug", action="store_true", help="stderr にスキャン詳細出力")
|
|
679
|
+
return p.parse_args(argv)
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
def main(argv: Sequence[str] | None = None) -> int:
|
|
683
|
+
args = parse_args(argv if argv is not None else sys.argv[1:])
|
|
684
|
+
root = Path(args.path).resolve()
|
|
685
|
+
if not root.exists() or not root.is_dir():
|
|
686
|
+
print(f"[repo-map] path not found or not a dir: {root}", file=sys.stderr)
|
|
687
|
+
return 2
|
|
688
|
+
languages = {lang.strip().lower() for lang in args.language.split(",") if lang.strip()}
|
|
689
|
+
unknown = languages - set(LANGUAGE_EXTENSIONS)
|
|
690
|
+
if unknown:
|
|
691
|
+
print(f"[repo-map] unknown languages: {sorted(unknown)}", file=sys.stderr)
|
|
692
|
+
languages -= unknown
|
|
693
|
+
if not languages:
|
|
694
|
+
print("[repo-map] no valid languages specified", file=sys.stderr)
|
|
695
|
+
return 2
|
|
696
|
+
entries = scan_repo(
|
|
697
|
+
root=root,
|
|
698
|
+
languages=languages,
|
|
699
|
+
extra_includes=args.include,
|
|
700
|
+
extra_excludes=args.exclude,
|
|
701
|
+
use_gitignore=not args.no_gitignore,
|
|
702
|
+
debug=args.debug,
|
|
703
|
+
)
|
|
704
|
+
if not entries:
|
|
705
|
+
print(f"[repo-map] no symbols extracted under {root}", file=sys.stderr)
|
|
706
|
+
return 2
|
|
707
|
+
picked, total_files, total_symbols = rank_and_truncate(entries, args.max_bytes, args.format)
|
|
708
|
+
truncated = len(picked) < total_files
|
|
709
|
+
out = render(picked, args.format, root, total_files, total_symbols, truncated)
|
|
710
|
+
sys.stdout.write(out)
|
|
711
|
+
return 0
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
if __name__ == "__main__":
|
|
715
|
+
raise SystemExit(main())
|