@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,284 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# test-improvement-proposal.sh — smoke tests for improvement-proposal.sh
|
|
3
|
+
#
|
|
4
|
+
# 検証する仕様:
|
|
5
|
+
# 1. observations 0 件 + state 空 → 何も出力しない、exit 0
|
|
6
|
+
# 2. mock observations: Bash deny 多数 → "Agent 委譲" 系の提案出力
|
|
7
|
+
# 3. mock GateGuard cleared 多数 → "事実材料" 系の提案出力
|
|
8
|
+
# 4. dedup: 24h 以内に同提案出ていたら抑制
|
|
9
|
+
# 5. ECC_IMPROVEMENT_PROPOSAL=off → 全 skip
|
|
10
|
+
# 6. HC_IMPROVEMENT_PROPOSAL_ENABLED=false → 全 skip
|
|
11
|
+
# 7. fail-open: python3 不在等の障害でも exit 0
|
|
12
|
+
# 8. failure-loop active session 検出 → "agent-introspect" 提案出力
|
|
13
|
+
#
|
|
14
|
+
# bash 3.2 互換 (macOS 標準) で動作する。
|
|
15
|
+
|
|
16
|
+
set -u
|
|
17
|
+
|
|
18
|
+
HOOKS_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
19
|
+
HOOK="$HOOKS_DIR/improvement-proposal.sh"
|
|
20
|
+
PASS=0
|
|
21
|
+
FAIL=0
|
|
22
|
+
|
|
23
|
+
TMP=$(mktemp -d)
|
|
24
|
+
trap 'rm -rf "$TMP"' EXIT
|
|
25
|
+
|
|
26
|
+
# Empty config so config-loader doesn't WARN
|
|
27
|
+
: > "$TMP/empty.yml"
|
|
28
|
+
|
|
29
|
+
assert_contains() {
|
|
30
|
+
local name="$1"
|
|
31
|
+
local needle="$2"
|
|
32
|
+
local haystack="$3"
|
|
33
|
+
if [[ "$haystack" == *"$needle"* ]]; then
|
|
34
|
+
printf "PASS: %s\n" "$name"
|
|
35
|
+
PASS=$((PASS + 1))
|
|
36
|
+
else
|
|
37
|
+
printf "FAIL: %s\n expected substring: %s\n got: %s\n" "$name" "$needle" "$haystack"
|
|
38
|
+
FAIL=$((FAIL + 1))
|
|
39
|
+
fi
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
assert_not_contains() {
|
|
43
|
+
local name="$1"
|
|
44
|
+
local needle="$2"
|
|
45
|
+
local haystack="$3"
|
|
46
|
+
if [[ "$haystack" != *"$needle"* ]]; then
|
|
47
|
+
printf "PASS: %s\n" "$name"
|
|
48
|
+
PASS=$((PASS + 1))
|
|
49
|
+
else
|
|
50
|
+
printf "FAIL: %s\n unexpected substring: %s\n got: %s\n" "$name" "$needle" "$haystack"
|
|
51
|
+
FAIL=$((FAIL + 1))
|
|
52
|
+
fi
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
assert_eq() {
|
|
56
|
+
local name="$1"
|
|
57
|
+
local expected="$2"
|
|
58
|
+
local actual="$3"
|
|
59
|
+
if [ "$expected" = "$actual" ]; then
|
|
60
|
+
printf "PASS: %s\n" "$name"
|
|
61
|
+
PASS=$((PASS + 1))
|
|
62
|
+
else
|
|
63
|
+
printf "FAIL: %s\n expected: [%s]\n actual: [%s]\n" "$name" "$expected" "$actual"
|
|
64
|
+
FAIL=$((FAIL + 1))
|
|
65
|
+
fi
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# Helper: run the hook in an isolated PROJECT_DIR with controlled HC_*
|
|
69
|
+
# Args:
|
|
70
|
+
# $1 = scenario name (used for tmpdir)
|
|
71
|
+
# $2 = obs records jsonl content (multiline string)
|
|
72
|
+
# $3 = number of GateGuard .cleared files to drop into HC_GATEGUARD_STATE_DIR
|
|
73
|
+
# $4 = number of confidence bypass.log lines
|
|
74
|
+
# $5 = number of failure-window logs with active loop signature
|
|
75
|
+
# $@ from $6 onward = extra "VAR=val" exports
|
|
76
|
+
run_hook() {
|
|
77
|
+
local scenario="$1"
|
|
78
|
+
local obs_content="$2"
|
|
79
|
+
local gg_count="$3"
|
|
80
|
+
local cg_count="$4"
|
|
81
|
+
local fw_count="$5"
|
|
82
|
+
shift 5
|
|
83
|
+
|
|
84
|
+
local proj="$TMP/$scenario"
|
|
85
|
+
rm -rf "$proj"
|
|
86
|
+
mkdir -p "$proj/.claude/.gateguard-state"
|
|
87
|
+
mkdir -p "$proj/.claude/.taskguard-state"
|
|
88
|
+
mkdir -p "$proj/.claude/.failure-window"
|
|
89
|
+
mkdir -p "$proj/.claude/.confidence-gate-state"
|
|
90
|
+
mkdir -p "$proj/.claude/.improvement-proposal-state"
|
|
91
|
+
mkdir -p "$proj/homunculus"
|
|
92
|
+
|
|
93
|
+
# observations.jsonl drop
|
|
94
|
+
if [ -n "$obs_content" ]; then
|
|
95
|
+
printf '%s\n' "$obs_content" > "$proj/homunculus/observations.jsonl"
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# GateGuard cleared files
|
|
99
|
+
local i=0
|
|
100
|
+
while [ "$i" -lt "$gg_count" ]; do
|
|
101
|
+
: > "$proj/.claude/.gateguard-state/edit-mock${i}.cleared"
|
|
102
|
+
i=$((i + 1))
|
|
103
|
+
done
|
|
104
|
+
|
|
105
|
+
# confidence bypass.log
|
|
106
|
+
if [ "$cg_count" -gt 0 ]; then
|
|
107
|
+
local j=0
|
|
108
|
+
: > "$proj/.claude/.confidence-gate-state/bypass.log"
|
|
109
|
+
while [ "$j" -lt "$cg_count" ]; do
|
|
110
|
+
printf '%s\tbypassed: mock-reason-%d\n' \
|
|
111
|
+
"${ECC_IMPROVEMENT_PROPOSAL_TEST_NOW:-2026-05-07T00:00:00Z}" "$j" \
|
|
112
|
+
>> "$proj/.claude/.confidence-gate-state/bypass.log"
|
|
113
|
+
j=$((j + 1))
|
|
114
|
+
done
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# failure-window active loops
|
|
118
|
+
local k=0
|
|
119
|
+
while [ "$k" -lt "$fw_count" ]; do
|
|
120
|
+
{
|
|
121
|
+
echo "Bash:fooerror"
|
|
122
|
+
echo "Bash:fooerror"
|
|
123
|
+
echo "Bash:fooerror"
|
|
124
|
+
} > "$proj/.claude/.failure-window/session${k}.log"
|
|
125
|
+
k=$((k + 1))
|
|
126
|
+
done
|
|
127
|
+
|
|
128
|
+
local extra_env=""
|
|
129
|
+
for spec in "$@"; do
|
|
130
|
+
extra_env="$extra_env export $spec;"
|
|
131
|
+
done
|
|
132
|
+
|
|
133
|
+
bash -c "
|
|
134
|
+
set +u
|
|
135
|
+
for v in \$(env | grep -oE '^HC_[A-Z_]+' || true); do unset \"\$v\"; done
|
|
136
|
+
unset ECC_IMPROVEMENT_PROPOSAL
|
|
137
|
+
export HC_CONFIG_PATH='$TMP/empty.yml'
|
|
138
|
+
export CLAUDE_PROJECT_DIR='$proj'
|
|
139
|
+
export HC_HOMUNCULUS_ROOT='$proj/homunculus'
|
|
140
|
+
export HC_GATEGUARD_STATE_DIR='.claude/.gateguard-state'
|
|
141
|
+
export HC_TASKGUARD_STATE_DIR='.claude/.taskguard-state'
|
|
142
|
+
export HC_FAILURE_WINDOW_DIR='.claude/.failure-window'
|
|
143
|
+
export HC_CONFIDENCE_STATE_DIR='.claude/.confidence-gate-state'
|
|
144
|
+
export HC_IMPROVEMENT_PROPOSAL_STATE_DIR='.claude/.improvement-proposal-state'
|
|
145
|
+
export HC_IMPROVEMENT_PROPOSAL_ENABLED=true
|
|
146
|
+
export HC_IMPROVEMENT_PROPOSAL_LOOKBACK_DAYS=7
|
|
147
|
+
export HC_IMPROVEMENT_PROPOSAL_MAX_COUNT=3
|
|
148
|
+
export HC_IMPROVEMENT_PROPOSAL_DEDUP_HOURS=24
|
|
149
|
+
export ECC_IMPROVEMENT_PROPOSAL_TEST_NOW='${ECC_IMPROVEMENT_PROPOSAL_TEST_NOW:-2026-05-07T12:00:00Z}'
|
|
150
|
+
$extra_env
|
|
151
|
+
bash '$HOOK' </dev/null 2>&1
|
|
152
|
+
echo \"EXIT_CODE=\$?\"
|
|
153
|
+
"
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
# === Helper to generate mock observations records ===
|
|
157
|
+
# Args: count, tool, with_perm_deny (1 or 0)
|
|
158
|
+
gen_obs_records() {
|
|
159
|
+
local count="$1"
|
|
160
|
+
local tool="$2"
|
|
161
|
+
local perm_deny="$3"
|
|
162
|
+
local i=0
|
|
163
|
+
local out=""
|
|
164
|
+
while [ "$i" -lt "$count" ]; do
|
|
165
|
+
local line='{"ts":"2026-05-07T10:00:00Z","event":"PostToolUse","tool":"'"$tool"'","raw":{"hook_event_name":"PostToolUse","tool_name":"'"$tool"'"'
|
|
166
|
+
if [ "$perm_deny" = "1" ]; then
|
|
167
|
+
line="$line"',"tool_response":{"is_error":true,"content":"Permission denied: please use Agent","decision":"block"}}}'
|
|
168
|
+
else
|
|
169
|
+
line="$line"',"tool_response":{"is_error":false}}}'
|
|
170
|
+
fi
|
|
171
|
+
if [ -z "$out" ]; then
|
|
172
|
+
out="$line"
|
|
173
|
+
else
|
|
174
|
+
out="$out"$'\n'"$line"
|
|
175
|
+
fi
|
|
176
|
+
i=$((i + 1))
|
|
177
|
+
done
|
|
178
|
+
printf '%s' "$out"
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
# === Case 1: empty obs + empty state -> no output, exit 0 ===
|
|
182
|
+
out=$(run_hook "case1" "" 0 0 0)
|
|
183
|
+
exit_line=$(printf '%s\n' "$out" | grep '^EXIT_CODE=' | tail -1)
|
|
184
|
+
non_exit_lines=$(printf '%s\n' "$out" | grep -v '^EXIT_CODE=')
|
|
185
|
+
assert_eq "Case1a: empty -> exit 0" "EXIT_CODE=0" "$exit_line"
|
|
186
|
+
assert_eq "Case1b: empty -> no output" "" "$non_exit_lines"
|
|
187
|
+
|
|
188
|
+
# === Case 2: many Bash perm denials -> Agent 委譲 proposal ===
|
|
189
|
+
obs=$(gen_obs_records 10 "Bash" 1)
|
|
190
|
+
out=$(run_hook "case2" "$obs" 0 0 0)
|
|
191
|
+
exit_line=$(printf '%s\n' "$out" | grep '^EXIT_CODE=' | tail -1)
|
|
192
|
+
assert_eq "Case2a: bash deny -> exit 0" "EXIT_CODE=0" "$exit_line"
|
|
193
|
+
assert_contains "Case2b: bash deny -> proposal header" "Improvement proposals" "$out"
|
|
194
|
+
assert_contains "Case2c: bash deny -> Agent 委譲 hint" "Agent tool 経由" "$out"
|
|
195
|
+
assert_contains "Case2d: footer present" "block しません" "$out"
|
|
196
|
+
|
|
197
|
+
# === Case 3: many GateGuard .cleared -> 事実材料 proposal ===
|
|
198
|
+
out=$(run_hook "case3" "" 8 0 0)
|
|
199
|
+
exit_line=$(printf '%s\n' "$out" | grep '^EXIT_CODE=' | tail -1)
|
|
200
|
+
assert_eq "Case3a: gateguard -> exit 0" "EXIT_CODE=0" "$exit_line"
|
|
201
|
+
assert_contains "Case3b: gateguard -> 事実材料 hint" "事実材料" "$out"
|
|
202
|
+
|
|
203
|
+
# === Case 4: dedup within DEDUP_HOURS suppresses repeat ===
|
|
204
|
+
# 1st run: produce proposal (uses dedup_state inside the project's .claude)
|
|
205
|
+
out1=$(run_hook "case4" "" 8 0 0)
|
|
206
|
+
# 2nd run with same project dir: should be suppressed
|
|
207
|
+
out2=$(bash -c "
|
|
208
|
+
set +u
|
|
209
|
+
for v in \$(env | grep -oE '^HC_[A-Z_]+' || true); do unset \"\$v\"; done
|
|
210
|
+
unset ECC_IMPROVEMENT_PROPOSAL
|
|
211
|
+
export HC_CONFIG_PATH='$TMP/empty.yml'
|
|
212
|
+
export CLAUDE_PROJECT_DIR='$TMP/case4'
|
|
213
|
+
export HC_HOMUNCULUS_ROOT='$TMP/case4/homunculus'
|
|
214
|
+
export HC_GATEGUARD_STATE_DIR='.claude/.gateguard-state'
|
|
215
|
+
export HC_TASKGUARD_STATE_DIR='.claude/.taskguard-state'
|
|
216
|
+
export HC_FAILURE_WINDOW_DIR='.claude/.failure-window'
|
|
217
|
+
export HC_CONFIDENCE_STATE_DIR='.claude/.confidence-gate-state'
|
|
218
|
+
export HC_IMPROVEMENT_PROPOSAL_STATE_DIR='.claude/.improvement-proposal-state'
|
|
219
|
+
export HC_IMPROVEMENT_PROPOSAL_ENABLED=true
|
|
220
|
+
export HC_IMPROVEMENT_PROPOSAL_LOOKBACK_DAYS=7
|
|
221
|
+
export HC_IMPROVEMENT_PROPOSAL_MAX_COUNT=3
|
|
222
|
+
export HC_IMPROVEMENT_PROPOSAL_DEDUP_HOURS=24
|
|
223
|
+
export ECC_IMPROVEMENT_PROPOSAL_TEST_NOW='2026-05-07T13:00:00Z'
|
|
224
|
+
bash '$HOOK' </dev/null 2>&1
|
|
225
|
+
echo \"EXIT_CODE=\$?\"
|
|
226
|
+
")
|
|
227
|
+
exit_line=$(printf '%s\n' "$out2" | grep '^EXIT_CODE=' | tail -1)
|
|
228
|
+
non_exit_lines=$(printf '%s\n' "$out2" | grep -v '^EXIT_CODE=')
|
|
229
|
+
assert_contains "Case4a: 1st run shows proposal" "Improvement proposals" "$out1"
|
|
230
|
+
assert_eq "Case4b: 2nd run within dedup -> exit 0" "EXIT_CODE=0" "$exit_line"
|
|
231
|
+
assert_eq "Case4c: 2nd run within dedup -> no output" "" "$non_exit_lines"
|
|
232
|
+
|
|
233
|
+
# === Case 5: ECC_IMPROVEMENT_PROPOSAL=off -> all skip ===
|
|
234
|
+
out=$(run_hook "case5" "$(gen_obs_records 10 Bash 1)" 8 0 0 "ECC_IMPROVEMENT_PROPOSAL=off")
|
|
235
|
+
exit_line=$(printf '%s\n' "$out" | grep '^EXIT_CODE=' | tail -1)
|
|
236
|
+
non_exit_lines=$(printf '%s\n' "$out" | grep -v '^EXIT_CODE=')
|
|
237
|
+
assert_eq "Case5a: ECC kill switch -> exit 0" "EXIT_CODE=0" "$exit_line"
|
|
238
|
+
assert_eq "Case5b: ECC kill switch -> no output" "" "$non_exit_lines"
|
|
239
|
+
|
|
240
|
+
# === Case 6: HC_IMPROVEMENT_PROPOSAL_ENABLED=false -> all skip ===
|
|
241
|
+
out=$(run_hook "case6" "$(gen_obs_records 10 Bash 1)" 8 0 0 "HC_IMPROVEMENT_PROPOSAL_ENABLED=false")
|
|
242
|
+
exit_line=$(printf '%s\n' "$out" | grep '^EXIT_CODE=' | tail -1)
|
|
243
|
+
non_exit_lines=$(printf '%s\n' "$out" | grep -v '^EXIT_CODE=')
|
|
244
|
+
assert_eq "Case6a: HC kill switch -> exit 0" "EXIT_CODE=0" "$exit_line"
|
|
245
|
+
assert_eq "Case6b: HC kill switch -> no output" "" "$non_exit_lines"
|
|
246
|
+
|
|
247
|
+
# === Case 7: fail-open without python3 -> exit 0 silently ===
|
|
248
|
+
# Strip dirs containing python3 from PATH so `command -v python3` fails.
|
|
249
|
+
# We DO keep system bins (/bin /usr/bin) so bash/grep/cat work.
|
|
250
|
+
strip_python_path() {
|
|
251
|
+
local p clean=""
|
|
252
|
+
local OLDIFS="$IFS"
|
|
253
|
+
IFS=':'
|
|
254
|
+
for p in $PATH; do
|
|
255
|
+
[ -z "$p" ] && continue
|
|
256
|
+
[ -x "$p/python3" ] && continue
|
|
257
|
+
if [ -z "$clean" ]; then clean="$p"; else clean="$clean:$p"; fi
|
|
258
|
+
done
|
|
259
|
+
IFS="$OLDIFS"
|
|
260
|
+
printf '%s' "$clean"
|
|
261
|
+
}
|
|
262
|
+
clean_path=$(strip_python_path)
|
|
263
|
+
proj7="$TMP/case7"
|
|
264
|
+
mkdir -p "$proj7"
|
|
265
|
+
out=$(PATH="$clean_path" bash -c "
|
|
266
|
+
set +u
|
|
267
|
+
for v in \$(env | grep -oE '^HC_[A-Z_]+' 2>/dev/null || true); do unset \"\$v\"; done
|
|
268
|
+
unset ECC_IMPROVEMENT_PROPOSAL
|
|
269
|
+
export HC_CONFIG_PATH='$TMP/empty.yml'
|
|
270
|
+
export CLAUDE_PROJECT_DIR='$proj7'
|
|
271
|
+
bash '$HOOK' </dev/null 2>&1
|
|
272
|
+
echo \"EXIT_CODE=\$?\"
|
|
273
|
+
")
|
|
274
|
+
exit_line=$(printf '%s\n' "$out" | grep '^EXIT_CODE=' | tail -1)
|
|
275
|
+
assert_eq "Case7: no python3 -> exit 0 (fail-open)" "EXIT_CODE=0" "$exit_line"
|
|
276
|
+
|
|
277
|
+
# === Case 8: failure-window active loop -> agent-introspect proposal ===
|
|
278
|
+
out=$(run_hook "case8" "" 0 0 1)
|
|
279
|
+
assert_contains "Case8a: failure-loop -> agent-introspect hint" "agent-introspect" "$out"
|
|
280
|
+
exit_line=$(printf '%s\n' "$out" | grep '^EXIT_CODE=' | tail -1)
|
|
281
|
+
assert_eq "Case8b: failure-loop -> exit 0" "EXIT_CODE=0" "$exit_line"
|
|
282
|
+
|
|
283
|
+
printf "\n--- test-improvement-proposal.sh: %d pass / %d fail ---\n" "$PASS" "$FAIL"
|
|
284
|
+
[ "$FAIL" -eq 0 ]
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# tool-call-slip-detector.sh — Stop hook
|
|
3
|
+
#
|
|
4
|
+
# 役割:
|
|
5
|
+
# AI 最終 assistant message の本文 (.text) に「tool-call markup slip の痕跡」
|
|
6
|
+
# が残っている場合、tool 呼び出しが serialize 失敗し本文 text 化したと判定し、
|
|
7
|
+
# top-level `{"decision":"block","reason":"..."}` を出力して AI を停止させず
|
|
8
|
+
# 次 turn に是正 context を注入する。
|
|
9
|
+
#
|
|
10
|
+
# markup slip とは: `antml:invoke` の構造化出力が生成中に部分破綻し、囲みタグ
|
|
11
|
+
# (`<invoke>`) が落ちて中身 (`call` トークン / bare command / `<parameter ...>`
|
|
12
|
+
# 断片) が assistant message の .text に流れ込む現象。tool は実行されないまま
|
|
13
|
+
# turn 終了 → 気づかず同じ batch を再 emit → 無限ループに見える
|
|
14
|
+
# (user には「途中で止まった / 動いていない」)。
|
|
15
|
+
# 実証: transcript dc60eacc (2026-06-01 task-69 session) で直近 400 行に
|
|
16
|
+
# standalone `call` 12+ 回 + `<parameter name="description">...` の text 漏れを観測。
|
|
17
|
+
#
|
|
18
|
+
# 検出の根拠 (なぜ .text を見れば分かるか):
|
|
19
|
+
# 成功した tool_use ブロックは `.type=="tool_use"` の構造化要素で .text を持たない
|
|
20
|
+
# ため last_assistant (= .text の join) には混入しない。slip した残骸のみが .text
|
|
21
|
+
# に現れる。よって .text に slip 痕跡があれば「直前 tool 呼び出しが失敗」と確定できる。
|
|
22
|
+
#
|
|
23
|
+
# 設計起源:
|
|
24
|
+
# docs/draft/tool-call-slip-detector-hook.md (approved_by: user, 2026-06-01)
|
|
25
|
+
# memory feedback_multi_tool_block_serialization_failure (arity × payload 複雑度
|
|
26
|
+
# 閾値超過で構造化出力が壊れる) の機械的セーフティネット。
|
|
27
|
+
# PreToolUse では捕捉不能 (slip は生成中 = parse 前に起きるため hook が発火しない)。
|
|
28
|
+
# 唯一効くレバー = 「user が気づいて指摘」を「Stop hook が自動検出し次 turn 自己是正」
|
|
29
|
+
# に置換する。同型先例 loop-confirmation-detector.sh (task-41) の構造を踏襲。
|
|
30
|
+
#
|
|
31
|
+
# 発火 timing:
|
|
32
|
+
# Stop hook (AI 最終 assistant message 完了時)
|
|
33
|
+
#
|
|
34
|
+
# 動作概要:
|
|
35
|
+
# 1. stdin JSON から transcript_path 抽出 (jq 不在 / 不在 path で fail-open)
|
|
36
|
+
# 2. bypass env 判定
|
|
37
|
+
# 3. transcript 末尾から最後の assistant .text を抽出
|
|
38
|
+
# 4. fenced code block (``` 囲み) を除去 (bug の meta 議論で markup を引用しても
|
|
39
|
+
# 誤検出しないため — slip は fence の外、引用は fence の中)
|
|
40
|
+
# 5. slip 痕跡 regex で照合:
|
|
41
|
+
# - standalone `call` 行 (broken invoke wrapper の残渣、最高 signal)
|
|
42
|
+
# - leaked markup 断片 (`<parameter name=` / `<invoke name=` / `</invoke>`
|
|
43
|
+
# / `function_calls>`)
|
|
44
|
+
# 6. 検出時: bypass.log に VIOLATION 記録 + `{"decision":"block","reason":"..."}`
|
|
45
|
+
# 7. 検出なしなら silent exit 0
|
|
46
|
+
#
|
|
47
|
+
# mode について:
|
|
48
|
+
# markup slip は Normal / Loop 両モードで起きる (mode 非依存) ため、
|
|
49
|
+
# loop-confirmation-detector と異なり mode gate しない (常時作動)。
|
|
50
|
+
#
|
|
51
|
+
# 環境変数:
|
|
52
|
+
# HC_FEATURE_TOOL_CALL_SLIP_DETECT_ENABLED=false ... feature toggle OFF (yml 経由集中管理)
|
|
53
|
+
# ECC_TOOL_CALL_SLIP_OFF=1 ... 一時 OFF (1 セッション)
|
|
54
|
+
# HC_TOOL_CALL_SLIP_DETECTION_ENABLED=false ... config レベル無効化
|
|
55
|
+
#
|
|
56
|
+
# 失敗時の挙動:
|
|
57
|
+
# - exit 0 のみ (fail-open)。jq 不在 / transcript 不在 / parse 失敗 → silent skip。
|
|
58
|
+
# - Stop hook の `decision:"block"` は「AI を停止させず reason を次 turn に注入」の
|
|
59
|
+
# 意味 (通常の PreToolUse block と semantics 反転)。
|
|
60
|
+
#
|
|
61
|
+
# bash flags の方針 (CLAUDE.md Critical Lessons HIGH 準拠):
|
|
62
|
+
# file-top に `set -euo pipefail` を **書かない** (caller への leak / SIGPIPE 死防止)。
|
|
63
|
+
|
|
64
|
+
set -uo pipefail # errexit は外し、unset + pipefail のみ
|
|
65
|
+
|
|
66
|
+
# stdin を必ず保持 (pipeline 詰まり防止)
|
|
67
|
+
input=$(cat 2>/dev/null || true)
|
|
68
|
+
|
|
69
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
70
|
+
|
|
71
|
+
# --- bypass-logger.sh (best-effort) ---
|
|
72
|
+
# shellcheck source=lib/bypass-logger.sh
|
|
73
|
+
if [ -f "$SCRIPT_DIR/lib/bypass-logger.sh" ]; then
|
|
74
|
+
# shellcheck disable=SC1091
|
|
75
|
+
source "$SCRIPT_DIR/lib/bypass-logger.sh" 2>/dev/null || true
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# --- config-loader.sh (best-effort、HC_* env 解決) ---
|
|
79
|
+
# shellcheck source=lib/config-loader.sh
|
|
80
|
+
if [ -f "$SCRIPT_DIR/lib/config-loader.sh" ]; then
|
|
81
|
+
# shellcheck disable=SC1091
|
|
82
|
+
source "$SCRIPT_DIR/lib/config-loader.sh" 2>/dev/null || true
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# --- feature toggle (paired 実装、yml feature_tool_call_slip_detect_enabled) ---
|
|
86
|
+
if command -v is_feature_enabled >/dev/null 2>&1 && ! is_feature_enabled tool_call_slip_detect; then
|
|
87
|
+
exit 0
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
# --- bypass 判定 ---
|
|
91
|
+
if [ "${ECC_TOOL_CALL_SLIP_OFF:-0}" = "1" ]; then
|
|
92
|
+
if command -v log_bypass >/dev/null 2>&1; then
|
|
93
|
+
log_bypass "tool-call-slip-detector" "ECC_TOOL_CALL_SLIP_OFF" "${ECC_BYPASS_REASON:-(not provided)}"
|
|
94
|
+
fi
|
|
95
|
+
exit 0
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
if [ "${HC_TOOL_CALL_SLIP_DETECTION_ENABLED:-true}" = "false" ]; then
|
|
99
|
+
if command -v log_bypass >/dev/null 2>&1; then
|
|
100
|
+
log_bypass "tool-call-slip-detector" "HC_TOOL_CALL_SLIP_DETECTION_ENABLED" "config-disabled"
|
|
101
|
+
fi
|
|
102
|
+
exit 0
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
# --- 依存チェック (jq 不在で fail-open) ---
|
|
106
|
+
if ! command -v jq >/dev/null 2>&1; then
|
|
107
|
+
exit 0
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
# --- transcript_path 抽出 ---
|
|
111
|
+
transcript_path=$(printf '%s' "$input" | jq -r '.transcript_path // empty' 2>/dev/null)
|
|
112
|
+
|
|
113
|
+
if [ -z "$transcript_path" ] || [ ! -f "$transcript_path" ]; then
|
|
114
|
+
exit 0
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# システム機密 path への traversal を拒否
|
|
118
|
+
case "$transcript_path" in
|
|
119
|
+
/etc/*|/usr/*|/bin/*|/sbin/*|/sys/*|/proc/*|/var/log/*|/dev/*)
|
|
120
|
+
exit 0 ;;
|
|
121
|
+
esac
|
|
122
|
+
|
|
123
|
+
# --- 直前 assistant text 抽出 (末尾 50 行、loop-confirmation-detector と同戦略) ---
|
|
124
|
+
last_assistant=$(tail -n 50 "$transcript_path" 2>/dev/null | jq -rs '
|
|
125
|
+
[
|
|
126
|
+
.[]
|
|
127
|
+
| select(
|
|
128
|
+
((.type // "") == "assistant")
|
|
129
|
+
or ((.role // "") == "assistant")
|
|
130
|
+
or (((.message // {}).role // "") == "assistant")
|
|
131
|
+
)
|
|
132
|
+
| (
|
|
133
|
+
((.message // .).content)
|
|
134
|
+
| if type == "array" then
|
|
135
|
+
[ .[] | (.text // "") ] | join("\n")
|
|
136
|
+
elif type == "string" then .
|
|
137
|
+
else "" end
|
|
138
|
+
)
|
|
139
|
+
]
|
|
140
|
+
| last // ""
|
|
141
|
+
' 2>/dev/null)
|
|
142
|
+
|
|
143
|
+
if [ -z "$last_assistant" ]; then
|
|
144
|
+
exit 0
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
# --- fenced code block (``` 囲み) を除去 ---
|
|
148
|
+
# bug の meta 議論で markup を引用 (常に fence 内) しても誤検出しないため。
|
|
149
|
+
# slip 残渣は prose 中 = fence の外に出るので、fence 内を捨てても検出は失われない。
|
|
150
|
+
stripped=$(printf '%s\n' "$last_assistant" | awk '
|
|
151
|
+
/^[[:space:]]*```/ { infence = !infence; next }
|
|
152
|
+
infence { next }
|
|
153
|
+
{ print }
|
|
154
|
+
')
|
|
155
|
+
|
|
156
|
+
# --- slip 痕跡 regex ---
|
|
157
|
+
# (1) standalone `call` 行: broken invoke wrapper の最高 signal。
|
|
158
|
+
# 前後 whitespace のみ許容、それ単独行のみ (文中の "call" 単語は match しない)。
|
|
159
|
+
# (2) leaked markup 断片: invoke 囲みが落ちて parameter / invoke タグだけ漏れた形。
|
|
160
|
+
SLIP_REGEX='(^[[:space:]]*call[[:space:]]*$)|(<parameter[[:space:]]+name=)|(<invoke[[:space:]]+name=)|(</invoke>)|(function_calls>)'
|
|
161
|
+
|
|
162
|
+
if ! printf '%s' "$stripped" | grep -Eq "$SLIP_REGEX" 2>/dev/null; then
|
|
163
|
+
# slip 痕跡なし → silent exit 0
|
|
164
|
+
exit 0
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
# --- 検出: bypass.log 記録 + reason 注入 ---
|
|
168
|
+
if command -v log_bypass >/dev/null 2>&1; then
|
|
169
|
+
log_bypass "tool-call-slip-detector" "VIOLATION" "markup-slip-detected"
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
warn_message=$(cat <<'EOF'
|
|
173
|
+
[tool-call-slip-detector] 直前の tool 呼び出しが serialize 失敗 (markup slip) し、command が本文 text 化して実行されませんでした。同じ batch を retry してはいけません (同じく失敗しループします)。次の手順で出し直してください: (1) tool 呼び出しは 1 ターンに 1 件のシンプルな形で再発行する。(2) 検証用の複雑な複合 command (複数 echo/grep の連結・grep の alternation・多数 quote/pipe/日本語混在) を inline で組まない — 既存/専用の smoke script を 1 コマンドで実行するか、目的ごとに 1 command へ分割する。(3) subagent fan-out が 3 件以上なら Workflow ツールを使う。手書きは 1 ターン 1-2 件まで、長 prompt は file 経由。(4) tool 呼び出しの前に `call` 等の前置き語を書かない。詳細: memory feedback_multi_tool_block_serialization_failure + .claude/rules/development-process.md §「多数 fan-out の Workflow 標準化 + 1 ターン tool block 上限」。
|
|
174
|
+
EOF
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
if printf '%s' "$warn_message" | jq -Rsc '{
|
|
178
|
+
decision: "block",
|
|
179
|
+
reason: .
|
|
180
|
+
}' 2>/dev/null; then
|
|
181
|
+
:
|
|
182
|
+
else
|
|
183
|
+
cat <<'FALLBACK'
|
|
184
|
+
{"decision":"block","reason":"[tool-call-slip-detector] 直前の tool 呼び出しが serialize 失敗 (markup slip) し本文 text 化しました。同 batch を retry せず、1 ターン 1 件のシンプルな tool 呼び出しで出し直してください。複雑な検証 command は分割 or 専用 smoke script を実行。詳細: .claude/rules/development-process.md §多数 fan-out。"}
|
|
185
|
+
FALLBACK
|
|
186
|
+
fi
|
|
187
|
+
|
|
188
|
+
exit 0
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# user-prompt-submit-dispatcher.sh — task-71 Step 4-6 dispatcher (thin wrapper)
|
|
3
|
+
# 実行 script (sourced lib ではない) → set -uo pipefail は OK (errexit 外す)。
|
|
4
|
+
# event 名は固定 literal で run_dispatch に渡す。matcher は $1 (matcher 無し event は空)。
|
|
5
|
+
set -uo pipefail
|
|
6
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
# shellcheck source=lib/dispatcher-core.sh
|
|
8
|
+
source "$DIR/lib/dispatcher-core.sh"
|
|
9
|
+
run_dispatch "UserPromptSubmit" "${1:-}"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# why-x5-reminder.sh — SessionStart wrapper child (session-start-wrapper.sh DEFAULT_HOOKS)
|
|
3
|
+
#
|
|
4
|
+
# session 開始時に 1 度、「何のために何をやるのか」を **1 行** で出すルールの compact pointer を
|
|
5
|
+
# <system-reminder> として提示する (advisory)。
|
|
6
|
+
# v11 (2026-06-01, task-68 §3.3) — 「ターン冒頭 1 回」規範。
|
|
7
|
+
# task-73 案 B: full 説明を 1-2 行 pointer へ短縮。本 rule 全文は frontmatter-less 常時参照として
|
|
8
|
+
# 毎ターン context に load 済のため、ターン冒頭 1 行の遵守は in-context rule に基づく。
|
|
9
|
+
#
|
|
10
|
+
# 環境変数:
|
|
11
|
+
# HC_WHY_X5_DISABLE=1 ... 一時無効化(雑談セッション等で off にする)
|
|
12
|
+
#
|
|
13
|
+
# 失敗時の挙動:
|
|
14
|
+
# - exit 0 のみ。失敗してもセッションをブロックしない。
|
|
15
|
+
|
|
16
|
+
set -uo pipefail # task-22 W1: errexit 外し SIGPIPE 141 サイレント死を防止 (CLAUDE.md Critical Lessons HIGH)
|
|
17
|
+
|
|
18
|
+
# config-loader.sh source (is_feature_enabled 関数取得用、task-45 Phase 2)
|
|
19
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
20
|
+
if [ -f "$SCRIPT_DIR/lib/config-loader.sh" ]; then
|
|
21
|
+
# shellcheck source=lib/config-loader.sh
|
|
22
|
+
source "$SCRIPT_DIR/lib/config-loader.sh" 2>/dev/null || true
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Feature toggle 参照 (task-45 Phase 2)
|
|
26
|
+
if command -v is_feature_enabled >/dev/null 2>&1 && ! is_feature_enabled why_x5_enforcement; then
|
|
27
|
+
exit 0 # feature OFF で no-op
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# stdin を必ず消費(消費しないと caller が pipe block する可能性がある)
|
|
31
|
+
cat > /dev/null 2>&1 || true
|
|
32
|
+
|
|
33
|
+
# 環境変数で無効化されている場合は何も出さない
|
|
34
|
+
if [ "${HC_WHY_X5_DISABLE:-0}" = "1" ]; then
|
|
35
|
+
exit 0
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# task-73 案 B: 1-2 行 pointer 短縮 (full rule 本文は in-context)
|
|
39
|
+
cat <<'EOF'
|
|
40
|
+
<system-reminder>
|
|
41
|
+
why-x5: 各ターン冒頭に1行「<何のため>のため<何をやる>を行う」(目的×作業)。詳細 .claude/rules/why-x5-output.md
|
|
42
|
+
</system-reminder>
|
|
43
|
+
EOF
|
|
44
|
+
|
|
45
|
+
exit 0
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# why-x5-violation-detect.sh — PostToolUse hook
|
|
3
|
+
#
|
|
4
|
+
# 役割:
|
|
5
|
+
# AI 直前応答 (transcript 末尾) を grep し、Why × 5 v10 format 違反 (4 セクション
|
|
6
|
+
# format / 「【システムの存在意義】」「【whyN】」等の v9 残骸 / 「何のため」省略)
|
|
7
|
+
# を検出した場合のみ、`<system-reminder>` で v10 1 行 format を再注入する。
|
|
8
|
+
# 違反未検出時は silent (exit 0)。
|
|
9
|
+
#
|
|
10
|
+
# 設計の根本変更 (task-21 W0.3, 2026-05-23):
|
|
11
|
+
# 旧 why-x5-reminder.sh は UserPromptSubmit で毎ターン全文 (~2 KB) 注入していたが、
|
|
12
|
+
# AI は 1 度読めば理解しているため過剰だった。
|
|
13
|
+
# 本 hook が「実際に違反した時のみ」再注入することで attention dilution を解消。
|
|
14
|
+
#
|
|
15
|
+
# 簡略実装 (初期版):
|
|
16
|
+
# transcript の末尾 50 行から最後の assistant text を抽出し、以下を grep:
|
|
17
|
+
# - v9 残骸: "【システムの存在意義】" / "【whyN】" / "【現在行っていること】" / "【他の選択肢を取らない理由】"
|
|
18
|
+
# 検出時は <system-reminder> 出力、未検出時は silent。
|
|
19
|
+
# 将来精度向上の余地: 「何のため」省略の構文解析、装飾行 (見出し / 表) 検出など。
|
|
20
|
+
#
|
|
21
|
+
# 環境変数:
|
|
22
|
+
# HC_WHY_X5_VIOLATION_ENABLED=false ... 無効化
|
|
23
|
+
#
|
|
24
|
+
# 失敗時の挙動:
|
|
25
|
+
# - exit 0 のみ。failure は fail-open。
|
|
26
|
+
#
|
|
27
|
+
# 設計起源:
|
|
28
|
+
# docs/draft/system-reminder-attention-fix.md §2 W0.3
|
|
29
|
+
# docs/tasks/task-21-system-reminder-attention-fix.md W0.3
|
|
30
|
+
#
|
|
31
|
+
# 共有 feature toggle group:
|
|
32
|
+
# - グループ制御 toggle: `feature_why_x5_enforcement_enabled` (default: true)
|
|
33
|
+
# - OFF にすると本 hook を含む同 group の全 hook が no-op
|
|
34
|
+
# - 編集: `bash .claude/scripts/hc-config.sh --feature why_x5_enforcement=false`
|
|
35
|
+
# - 同 group の他 hook: why-x5-reminder.sh
|
|
36
|
+
|
|
37
|
+
set -u
|
|
38
|
+
|
|
39
|
+
# config 読み込み (HC_* 変数 + is_feature_enabled 関数 export、task-45 Phase 2)
|
|
40
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
41
|
+
# shellcheck source=lib/config-loader.sh
|
|
42
|
+
. "$SCRIPT_DIR/lib/config-loader.sh" 2>/dev/null || true
|
|
43
|
+
|
|
44
|
+
# Feature toggle 参照 (task-45 Phase 2)
|
|
45
|
+
if command -v is_feature_enabled >/dev/null 2>&1 && ! is_feature_enabled why_x5_enforcement; then
|
|
46
|
+
echo '{}'
|
|
47
|
+
exit 0 # feature OFF で no-op (PostToolUse hook response 規約: empty JSON)
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
# stdin を必ず消費
|
|
51
|
+
input=$(cat 2>/dev/null || true)
|
|
52
|
+
|
|
53
|
+
# --- 早期 bypass ---
|
|
54
|
+
if [ "${HC_WHY_X5_VIOLATION_ENABLED:-true}" = "false" ]; then
|
|
55
|
+
exit 0
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
if [ "${HC_WHY_X5_DISABLE:-0}" = "1" ]; then
|
|
59
|
+
exit 0
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# --- 依存チェック ---
|
|
63
|
+
if ! command -v jq >/dev/null 2>&1; then
|
|
64
|
+
exit 0
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# --- transcript_path 抽出 ---
|
|
68
|
+
transcript_path=$(printf '%s' "$input" | jq -r '.transcript_path // empty' 2>/dev/null)
|
|
69
|
+
|
|
70
|
+
if [ -z "$transcript_path" ] || [ ! -f "$transcript_path" ]; then
|
|
71
|
+
exit 0
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
# --- 直前 assistant text 抽出 (末尾 50 行) ---
|
|
75
|
+
last_assistant=$(tail -n 50 "$transcript_path" 2>/dev/null | jq -rs '
|
|
76
|
+
[
|
|
77
|
+
.[]
|
|
78
|
+
| select(
|
|
79
|
+
((.type // "") == "assistant")
|
|
80
|
+
or ((.role // "") == "assistant")
|
|
81
|
+
or (((.message // {}).role // "") == "assistant")
|
|
82
|
+
)
|
|
83
|
+
| (
|
|
84
|
+
((.message // .).content)
|
|
85
|
+
| if type == "array" then
|
|
86
|
+
[ .[] | (.text // "") ] | join("\n")
|
|
87
|
+
elif type == "string" then .
|
|
88
|
+
else "" end
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
| last // ""
|
|
92
|
+
' 2>/dev/null)
|
|
93
|
+
|
|
94
|
+
if [ -z "$last_assistant" ]; then
|
|
95
|
+
exit 0
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# --- v9 4 セクション format 残骸検出 ---
|
|
99
|
+
# default パターン (env override 可、改行区切り)
|
|
100
|
+
DEFAULT_PATTERNS='【システムの存在意義】
|
|
101
|
+
【whyN】
|
|
102
|
+
【現在行っていること】
|
|
103
|
+
【他の選択肢を取らない理由】
|
|
104
|
+
【why1】
|
|
105
|
+
【why2】
|
|
106
|
+
【why3】'
|
|
107
|
+
|
|
108
|
+
PATTERNS="${HC_WHY_X5_VIOLATION_PATTERNS:-$DEFAULT_PATTERNS}"
|
|
109
|
+
|
|
110
|
+
matched=""
|
|
111
|
+
while IFS= read -r pat; do
|
|
112
|
+
if [ -n "$pat" ] && printf '%s' "$last_assistant" | grep -qF "$pat"; then
|
|
113
|
+
matched="$pat"
|
|
114
|
+
break
|
|
115
|
+
fi
|
|
116
|
+
done <<< "$PATTERNS"
|
|
117
|
+
|
|
118
|
+
if [ -z "$matched" ]; then
|
|
119
|
+
exit 0
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
# --- system-reminder 注入 ---
|
|
123
|
+
cat <<EOF
|
|
124
|
+
<system-reminder>
|
|
125
|
+
**Why × 5 v10 format 違反検出 (why-x5-violation-detect)**
|
|
126
|
+
|
|
127
|
+
直前応答に v9 残骸 (4 セクション format) が含まれています:
|
|
128
|
+
matched pattern: \`${matched}\`
|
|
129
|
+
|
|
130
|
+
v10 format (2026-05-23 確定、\`.claude/rules/why-x5-output.md\`):
|
|
131
|
+
|
|
132
|
+
「<何のため (目的)> のため、<何をやる (今のステップ / tool / file)> を行う」
|
|
133
|
+
|
|
134
|
+
要件:
|
|
135
|
+
- ステップごとに **1 行** (ツール呼び出し前 / 別ステップ移行時 / 別 file 編集時)
|
|
136
|
+
- 4 セクション format (システム意義 / whyN / 現在の作業 / 他選択肢) は **v10 で廃止**
|
|
137
|
+
- 装飾 (見出し / 表 / 矢印列挙) は禁止、純粋な 1 行のみ
|
|
138
|
+
- 「何のため」と「何をやる」の **両方** が含まれる
|
|
139
|
+
|
|
140
|
+
OK 例:
|
|
141
|
+
- 「install.sh を smoke test するため、tmp dir に実 install を実行する」
|
|
142
|
+
- 「規範を v10 化するため、why-x5-output.md を全文書き換える」
|
|
143
|
+
|
|
144
|
+
次の作業ステップから v10 1 行 format で出力してください。
|
|
145
|
+
|
|
146
|
+
**bypass**:
|
|
147
|
+
- \`HC_WHY_X5_VIOLATION_ENABLED=false\` で本検出 OFF
|
|
148
|
+
- \`HC_WHY_X5_DISABLE=1\` で Why × 5 規範全体 OFF (雑談セッション等)
|
|
149
|
+
</system-reminder>
|
|
150
|
+
EOF
|
|
151
|
+
|
|
152
|
+
exit 0
|