diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 1a5397b..60560d1 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -10,7 +10,7 @@ Два скилла обязательны всегда — экономят токены, повышают качество: - **`/caveman`** — все общение с пользователем и между агентами. Кратко, без воды, без лести. -- **`/humanizer`** — все судебные документы и файлы дела (hunter_*.md, knowledge-map.md, practice.md, positions.md, итоговые .md/.docx). Живой профессиональный юридический язык. +- **`/humanizer-legal`** — все судебные документы и файлы дела (hunter_*.md, knowledge-map.md, practice.md, positions.md, итоговые .md/.docx). Живой профессиональный юридический язык + снятие AI-паттернов, по которым документ атакуют лингвистической экспертизой. Перед сдачей документа гнать `~/.claude/skills/humanizer-legal/scripts/scan_legal.sh ФАЙЛ`. Бытовой `/humanizer-ru` к судебным документам НЕ применять: разговорность, идиомы и «человеческие опечатки» в юрдокументе сами являются маркером. Нормы закона, Пленум, КС РФ и цитаты судебных актов: дословно или не цитировать. diff --git a/.claude/settings.json b/.claude/settings.json index be1478e..43dabd2 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -21,5 +21,787 @@ ] } ] - } -} + }, + "skillOverrides": { + "3-statement-model": "off", + "3d-visualizer": "off", + "_gstack-command": "off", + "ab-testing": "off", + "accessibility": "off", + "accrual-schedule": "off", + "ad-creative": "off", + "ads": "off", + "agent-architecture-audit": "off", + "agent-browser": "off", + "agent-capability-installer": "off", + "agent-harness-construction": "off", + "agent-introspection-debugging": "off", + "agent-reach": "off", + "agent-skills-catalog": "off", + "agent-sort": "off", + "agentic-engineering": "off", + "agentic-os": "off", + "ai-first-engineering": "off", + "ai-readiness": "off", + "ai-regression-testing": "off", + "ai-seo": "off", + "analytics": "off", + "android-design-guidelines": "off", + "animation-designer": "off", + "animejs": "off", + "api-connector-builder": "off", + "app-store-screenshots": "off", + "apple-hig-designer": "off", + "article-writing": "off", + "aso": "off", + "asset-manager": "off", + "athena-research": "off", + "audit-prompt-caching": "off", + "audit-xls": "off", + "automating-ioc-enrichment": "off", + "automation-audit-ops": "off", + "autonomous-loops": "off", + "autoplan": "off", + "avito-api": "off", + "ax-audit": "off", + "b2b-brand-marketing": "off", + "benchmark": "off", + "benchmark-models": "off", + "benchmark-optimization-loop": "off", + "best-practices": "off", + "blender-motion-state-inspection": "off", + "blueprint": "off", + "board-council": "off", + "bond-futures-basis": "off", + "bond-relative-value": "off", + "bookwright": "off", + "bootstrap-project": "off", + "brainstorming": "off", + "brand": "off", + "brand-architecture": "off", + "brand-audit": "off", + "brand-context": "off", + "brand-designer": "off", + "brand-guidelines": "off", + "brand-identity": "off", + "brand-launch": "off", + "brand-manifesto": "off", + "brand-measurement": "off", + "brand-messaging": "off", + "brand-naming": "off", + "brand-packaging": "off", + "brand-partnerships": "off", + "brand-positioning": "off", + "brand-story": "off", + "brand-strategy": "off", + "brand-voice": "off", + "brandkit": "off", + "break-trace": "off", + "browse": "off", + "browser-testing-with-devtools": "off", + "browser-use": "off", + "buyer-list": "off", + "canary": "off", + "canvas-design": "off", + "careful": "off", + "carrier-relationship-management": "off", + "catalyst-calendar": "off", + "cavecrew": "off", + "caveman-commit": "off", + "caveman-compress": "off", + "caveman-help": "off", + "caveman-review": "off", + "caveman-stats": "off", + "cheat-on-content": "off", + "chrome-devtools": "off", + "churn-prevention": "off", + "cim-builder": "off", + "cisco-ios-patterns": "off", + "ckm-banner-design": "off", + "ckm-brand": "off", + "ckm-design": "off", + "ckm-design-system": "off", + "ckm-slides": "off", + "ckm-ui-styling": "off", + "claude-devfleet": "off", + "claude-video": "off", + "clean-data-xls": "off", + "clickhouse-io": "off", + "client-report": "off", + "client-review": "off", + "co-marketing": "off", + "code-tour": "off", + "codex": "off", + "cold-email": "off", + "community-marketing": "off", + "competitive-analysis": "off", + "competitor-branding": "off", + "competitor-profiling": "off", + "competitors": "off", + "configure-ecc": "off", + "connect-chrome": "off", + "connections-optimizer": "off", + "content-engine": "off", + "content-hash-cache-pattern": "off", + "content-strategy": "off", + "context-restore": "off", + "context-save": "off", + "continuous-agent-loop": "off", + "continuous-learning": "off", + "continuous-learning-v2": "off", + "contribute": "off", + "copy-editing": "off", + "copywriting": "off", + "core-web-vitals": "off", + "cost-aware-llm-pipeline": "off", + "cost-tracking": "off", + "council": "off", + "council-chat": "off", + "cro": "off", + "crosspost": "off", + "cso": "off", + "css-animations": "off", + "customer-billing-ops": "off", + "customer-research": "off", + "customs-trade-compliance": "off", + "d2c-marketing": "off", + "dashboard-builder": "off", + "data-scraper-agent": "off", + "data-throughput-accelerator": "off", + "data-visualizer": "off", + "database-migrations": "off", + "datapack-builder": "off", + "dd-checklist": "off", + "dd-meeting-prep": "off", + "deal-screening": "off", + "deal-sourcing": "off", + "deal-tracker": "off", + "deck-refresh": "off", + "deep-research": "off", + "defi-amm-security": "off", + "deployment-patterns": "off", + "design": "off", + "design-an-interface": "off", + "design-brief-generator": "off", + "design-consultation": "off", + "design-html": "off", + "design-md": "off", + "design-review": "off", + "design-shotgun": "off", + "design-system-architect": "off", + "design-taste-frontend": "off", + "design-taste-frontend-v1": "off", + "devex-review": "off", + "diagnose": "off", + "directory-submissions": "off", + "dispatching-parallel-agents": "off", + "django-security": "off", + "docker-patterns": "off", + "document-generate": "off", + "document-release": "off", + "docx-contracts": "off", + "e2e-testing": "off", + "ecc-tools-cost-audit": "off", + "edit-article": "off", + "email-marketing": "off", + "email-ops": "off", + "emails": "off", + "emil-design-eng": "off", + "energy-procurement": "off", + "enhance-prompt": "off", + "enterprise-agent-ops": "off", + "error-handling": "off", + "eval-harness": "off", + "evm-token-decimals": "off", + "exa-search": "off", + "extract-design-system": "off", + "fable5-bug-hunt-prompt": "off", + "fable5-prd-autobuild": "off", + "fable5-scrollytelling-pipeline": "off", + "fact-checker": "off", + "fal-ai-media": "off", + "figma": "off", + "figma-code-connect-components": "off", + "figma-create-design-system-rules": "off", + "figma-developer": "off", + "figma-generate-design": "off", + "figma-generate-library": "off", + "figma-implement-design": "off", + "figma-to-code": "off", + "figma-use": "off", + "finance-billing-ops": "off", + "finishing-a-development-branch": "off", + "firecrawl": "off", + "firecrawl-agent": "off", + "firecrawl-build-interact": "off", + "firecrawl-build-onboarding": "off", + "firecrawl-build-scrape": "off", + "firecrawl-build-search": "off", + "firecrawl-company-directories": "off", + "firecrawl-competitive-intel": "off", + "firecrawl-crawl": "off", + "firecrawl-dashboard-reporting": "off", + "firecrawl-deep-research": "off", + "firecrawl-demo-walkthrough": "off", + "firecrawl-download": "off", + "firecrawl-interact": "off", + "firecrawl-knowledge-base": "off", + "firecrawl-knowledge-ingest": "off", + "firecrawl-lead-gen": "off", + "firecrawl-lead-research": "off", + "firecrawl-map": "off", + "firecrawl-market-research": "off", + "firecrawl-parse": "off", + "firecrawl-qa": "off", + "firecrawl-research-papers": "off", + "firecrawl-scrape": "off", + "firecrawl-search": "off", + "firecrawl-seo-audit": "off", + "firecrawl-shop": "off", + "firecrawl-website-design-clone": "off", + "firecrawl-workflows": "off", + "fixed-income-portfolio": "off", + "flutter-adaptive-ui": "off", + "flutter-add-widget-preview": "off", + "flutter-animations": "off", + "flutter-build-responsive-layout": "off", + "flutter-fix-layout-issues": "off", + "foundation-models-on-device": "off", + "framer-motion-animator": "off", + "free-tools": "off", + "freeze": "off", + "frontend-builder": "off", + "frontend-design": "off", + "frontend-design-audit": "off", + "frontend-designer": "off", + "frontend-ui-engineering": "off", + "frontend-ux-ui": "off", + "fsi-strip-profile": "off", + "full-output-enforcement": "off", + "funding-digest": "off", + "fx-carry-trade": "off", + "generate-voiceover": "off", + "gigachat-setup": "off", + "git-guardrails-claude-code": "off", + "github-ops": "off", + "gl-recon": "off", + "google-ads": "off", + "google-workspace-ops": "off", + "gpt-image-2": "off", + "gpt-taste": "off", + "gpt2giga": "off", + "grill-me": "off", + "grill-with-docs": "off", + "gsap": "off", + "gsd-add-backlog": "off", + "gsd-add-phase": "off", + "gsd-add-tests": "off", + "gsd-add-todo": "off", + "gsd-ai-integration-phase": "off", + "gsd-analyze-dependencies": "off", + "gsd-audit-fix": "off", + "gsd-audit-milestone": "off", + "gsd-audit-uat": "off", + "gsd-autonomous": "off", + "gsd-check-todos": "off", + "gsd-cleanup": "off", + "gsd-code-review": "off", + "gsd-code-review-fix": "off", + "gsd-complete-milestone": "off", + "gsd-debug": "off", + "gsd-discuss-phase": "off", + "gsd-do": "off", + "gsd-docs-update": "off", + "gsd-edit-phase": "off", + "gsd-eval-review": "off", + "gsd-execute-phase": "off", + "gsd-explore": "off", + "gsd-extract_learnings": "off", + "gsd-fast": "off", + "gsd-forensics": "off", + "gsd-from-gsd2": "off", + "gsd-graphify": "off", + "gsd-health": "off", + "gsd-help": "off", + "gsd-import": "off", + "gsd-inbox": "off", + "gsd-ingest-docs": "off", + "gsd-insert-phase": "off", + "gsd-intel": "off", + "gsd-join-discord": "off", + "gsd-list-phase-assumptions": "off", + "gsd-list-workspaces": "off", + "gsd-manager": "off", + "gsd-map-codebase": "off", + "gsd-milestone-summary": "off", + "gsd-mvp-phase": "off", + "gsd-new-milestone": "off", + "gsd-new-project": "off", + "gsd-new-workspace": "off", + "gsd-next": "off", + "gsd-note": "off", + "gsd-pause-work": "off", + "gsd-plan-milestone-gaps": "off", + "gsd-plan-phase": "off", + "gsd-plan-review-convergence": "off", + "gsd-plant-seed": "off", + "gsd-pr-branch": "off", + "gsd-profile-user": "off", + "gsd-progress": "off", + "gsd-quick": "off", + "gsd-reapply-patches": "off", + "gsd-remove-phase": "off", + "gsd-remove-workspace": "off", + "gsd-research-phase": "off", + "gsd-resume-work": "off", + "gsd-review": "off", + "gsd-review-backlog": "off", + "gsd-scan": "off", + "gsd-secure-phase": "off", + "gsd-session-report": "off", + "gsd-set-profile": "off", + "gsd-settings": "off", + "gsd-settings-advanced": "off", + "gsd-settings-integrations": "off", + "gsd-ship": "off", + "gsd-sketch": "off", + "gsd-sketch-wrap-up": "off", + "gsd-spec-phase": "off", + "gsd-spike": "off", + "gsd-spike-wrap-up": "off", + "gsd-stats": "off", + "gsd-sync-skills": "off", + "gsd-thread": "off", + "gsd-ui-phase": "off", + "gsd-ui-review": "off", + "gsd-ultraplan-phase": "off", + "gsd-undo": "off", + "gsd-update": "off", + "gsd-validate-phase": "off", + "gsd-verify-work": "off", + "gsd-workstreams": "off", + "gstack": "off", + "gstack-upgrade": "off", + "guard": "off", + "guizang-ppt": "off", + "handoff": "off", + "hatch-pet": "off", + "health": "off", + "healthcare-phi-compliance": "off", + "high-end-visual-design": "off", + "hipaa-compliance": "off", + "homelab-network-readiness": "off", + "homelab-network-setup": "off", + "hookify-rules": "off", + "humanizer-en": "off", + "hyperframes": "off", + "hyperframes-cli": "off", + "hyperframes-media": "off", + "hyperframes-registry": "off", + "ic-memo": "off", + "idea-generation": "off", + "image": "off", + "image-to-code": "off", + "imagegen-frontend-mobile": "off", + "imagegen-frontend-web": "off", + "impeccable": "off", + "improve-codebase-architecture": "off", + "industrial-brutalist-ui": "off", + "influencer-marketing": "off", + "initiating-coverage": "off", + "inventory-demand-planning": "off", + "investigate": "off", + "investment-proposal": "off", + "investor-materials": "off", + "investor-outreach": "off", + "ios-clean": "off", + "ios-design-guidelines": "off", + "ios-design-review": "off", + "ios-fix": "off", + "ios-qa": "off", + "ios-sync": "off", + "ipados-design-guidelines": "off", + "iterative-retrieval": "off", + "ito-basket-compare": "off", + "ito-data-atlas-agent": "off", + "ito-market-intelligence": "off", + "ito-trade-planner": "off", + "jira-integration": "off", + "jpa-patterns": "off", + "knowledge-ops": "off", + "kyc-doc-parse": "off", + "kyc-rules": "off", + "land-and-deploy": "off", + "landing-report": "off", + "laravel-security": "off", + "last30days": "off", + "latency-critical-systems": "off", + "launch": "off", + "lead-intelligence": "off", + "lead-magnets": "off", + "learn": "off", + "liquid-glass-design": "off", + "llm-trading-agent-security": "off", + "logistics-exception-management": "off", + "looper": "off", + "lottie": "off", + "macos-design-guidelines": "off", + "macro-rates-monitor": "off", + "make-pdf": "off", + "managing-cloud-identity-with-okta": "off", + "managing-intelligence-lifecycle": "off", + "manim-video": "off", + "market-research": "off", + "marketing-ideas": "off", + "marketing-plan": "off", + "marketing-psychology": "off", + "mcp-builder": "off", + "messages-ops": "off", + "meta-ads": "off", + "migrate-to-codex": "off", + "migrate-to-shoehorn": "off", + "minimalist-ui": "off", + "mnemazina": "off", + "mnemazine": "off", + "model-update": "off", + "morning-note": "off", + "mpstats": "off", + "mysql-patterns": "off", + "nanoclaw-repl": "off", + "netmiko-ssh-automation": "off", + "network-bgp-diagnostics": "off", + "network-config-validation": "off", + "network-interface-health": "off", + "night-shift": "off", + "nodejs-keccak256": "off", + "non-fiction-book-factory": "off", + "notebooklm": "off", + "nothing-design": "off", + "nutrient-document-processing": "off", + "obsidian-vault": "off", + "office-hours": "off", + "olympuz-agent-audit": "off", + "olympuz-agent-introspect": "off", + "olympuz-ai-regression-testing": "off", + "olympuz-api-connector-builder": "off", + "olympuz-ax-audit": "off", + "olympuz-backup-integrity": "off", + "olympuz-brand-identity": "off", + "olympuz-brand-naming": "off", + "olympuz-brand-strategy": "off", + "olympuz-brand-voice": "off", + "olympuz-brandkit": "off", + "olympuz-browser-test": "off", + "olympuz-capability-map": "off", + "olympuz-database-migrations": "off", + "olympuz-deimos": "off", + "olympuz-deployment-patterns": "off", + "olympuz-design-craft": "off", + "olympuz-design-systems": "off", + "olympuz-design-taste-frontend": "off", + "olympuz-docker-patterns": "off", + "olympuz-emil-design-eng": "off", + "olympuz-error-patterns": "off", + "olympuz-firecrawl-search": "off", + "olympuz-git-guardrails": "off", + "olympuz-github-ops": "off", + "olympuz-harness-build": "off", + "olympuz-high-end-visual-design": "off", + "olympuz-knowledge-synthesis": "off", + "olympuz-looper": "off", + "olympuz-mcp-scan": "off", + "olympuz-minimalist-ui": "off", + "olympuz-pantheon-design": "off", + "olympuz-performance-optimization": "off", + "olympuz-plankton-code-quality": "off", + "olympuz-playwright-explore-website": "off", + "olympuz-playwright-generate-test": "off", + "olympuz-review-exchange": "off", + "olympuz-sast-scan": "off", + "olympuz-secret-scan": "off", + "olympuz-security-bounty-hunter": "off", + "olympuz-security-scan": "off", + "olympuz-shadcn": "off", + "olympuz-site-clone": "off", + "olympuz-ssh-remote": "off", + "olympuz-systematic-debugging": "off", + "olympuz-taste-design": "off", + "olympuz-test-driven-development": "off", + "olympuz-ui-ux-pro-max": "off", + "olympuz-usability-tester": "off", + "olympuz-using-git-worktrees": "off", + "olympuz-ux-audit": "off", + "olympuz-verification-before-completion": "off", + "olympuz-vuln-triage": "off", + "olympuz-web-design-reviewer": "off", + "olympuz-web-quality-audit": "off", + "olympuz-webapp-testing": "off", + "olympuz-writing-plans": "off", + "onboarding": "off", + "open-design": "off", + "open-gstack-browser": "off", + "option-vol-analysis": "off", + "ozon-seller-api": "off", + "pair-agent": "off", + "pantheon-design": "off", + "parallel-execution-optimizer": "off", + "paywalls": "off", + "penpot-uiux-design": "off", + "performance": "off", + "performance-optimization": "off", + "perl-security": "off", + "personal-brand": "off", + "pitch-deck": "off", + "plan-ceo-review": "off", + "plan-design-review": "off", + "plan-devex-review": "off", + "plan-eng-review": "off", + "plan-tune": "off", + "plankton-code-quality": "off", + "playwright": "off", + "playwright-explore-website": "off", + "playwright-generate-test": "off", + "ponytail": "off", + "ponytail-audit": "off", + "ponytail-debt": "off", + "ponytail-help": "off", + "ponytail-review": "off", + "popups": "off", + "portfolio-monitoring": "off", + "portfolio-rebalance": "off", + "positioning": "off", + "postgres-patterns": "off", + "ppt-template-creator": "off", + "pptx-author": "off", + "prediction-market-oracle-research": "off", + "prediction-market-risk-review": "off", + "premium-frontend-ui": "off", + "pricing": "off", + "prisma-patterns": "off", + "process-letter": "off", + "product-capability": "off", + "product-designer": "off", + "product-marketing": "off", + "production-audit": "off", + "production-scheduling": "off", + "programmatic-seo": "off", + "project-builder": "off", + "project-flow-ops": "off", + "prompt-master": "off", + "prompt-optimizer": "off", + "prospecting": "off", + "prototype": "off", + "prototype-designer": "off", + "qa": "off", + "qa-only": "off", + "quality-nonconformance": "off", + "quarkus-security": "off", + "quill-context": "off", + "radar-abtop": "off", + "radar-bernstein": "off", + "radar-code-context-engine": "off", + "radar-how-claude-code-works": "off", + "radar-open-design": "off", + "radar-open-multi-agent": "off", + "ralphinho-rfc-pipeline": "off", + "react-components": "off", + "rebranding": "off", + "receiving-code-review": "off", + "record-demo": "off", + "recursive-decision-ledger": "off", + "redesign-existing-projects": "off", + "redub": "off", + "referrals": "off", + "regex-vs-llm-structured-text": "off", + "remotion-best-practices": "off", + "remotion-to-hyperframes": "off", + "remotion-video-creation": "off", + "request-refactor-plan": "off", + "requesting-code-review": "off", + "research-ops": "off", + "retro": "off", + "returns-analysis": "off", + "returns-reverse-logistics": "off", + "review": "off", + "revops": "off", + "roll-forward": "off", + "ru-en-bridge": "off", + "ru-text": "off", + "sales-enablement": "off", + "scaffold-exercises": "off", + "scenario-writer": "off", + "scene-review": "off", + "schema": "off", + "scientific-db-pubmed-database": "off", + "scientific-db-uspto-database": "off", + "scientific-pkg-gget": "off", + "scientific-thinking-literature-review": "off", + "scientific-thinking-scholar-evaluation": "off", + "scrape": "off", + "screenshot": "off", + "search-first": "off", + "sector-overview": "off", + "security-bounty-hunter": "off", + "security-review": "off", + "security-scan": "off", + "seo": "off", + "seo-audit": "off", + "setup": "off", + "setup-browser-cookies": "off", + "setup-deploy": "off", + "setup-gbrain": "off", + "setup-matt-pocock-skills": "off", + "setup-os": "off", + "setup-pre-commit": "off", + "shadcn": "off", + "shadcn-component-discovery": "off", + "shadcn-component-review": "off", + "shadcn-improve": "off", + "shadcn-ui": "off", + "ship": "off", + "signup": "off", + "site-architecture": "off", + "skill-creator": "off", + "skill-generalizer": "off", + "skill-miner": "off", + "skill-personalizer": "off", + "skill-scout": "off", + "skill-stocktake": "off", + "skillify": "off", + "skills": "off", + "sms": "off", + "social": "off", + "social-graph-ranker": "off", + "spatial-developer": "off", + "spec": "off", + "springboot-security": "off", + "ssh-remote-connection": "off", + "stitch-code-to-design": "off", + "stitch-design-taste": "off", + "stitch-extract-design-md": "off", + "stitch-generate-design": "off", + "stitch-manage-design-system": "off", + "strategic-compact": "off", + "subagent-driven-development": "off", + "supabase": "off", + "supabase-postgres-best-practices": "off", + "swap-curve-strategy": "off", + "swift-actor-persistence": "off", + "swift-concurrency-6-2": "off", + "swift-protocol-di-testing": "off", + "swiftui-animation": "off", + "swiftui-patterns": "off", + "swiftui-pro": "off", + "sync-gbrain": "off", + "systematic-debugging": "off", + "tailwind": "off", + "tailwindcss-animations": "off", + "target-audience": "off", + "task-observer": "off", + "taste-design": "off", + "tax-loss-harvesting": "off", + "tdd": "off", + "tdd-workflow": "off", + "teach": "off", + "team-builder": "off", + "teaser": "off", + "template": "off", + "terminal-ops": "off", + "test-driven-development": "off", + "theme-factory": "off", + "three": "off", + "threejs-animation": "off", + "threejs-fundamentals": "off", + "threejs-geometry": "off", + "threejs-interaction": "off", + "threejs-lighting": "off", + "threejs-loaders": "off", + "threejs-materials": "off", + "threejs-postprocessing": "off", + "threejs-shaders": "off", + "threejs-textures": "off", + "to-issues": "off", + "to-prd": "off", + "token-budget-advisor": "off", + "triage": "off", + "triaging-vulnerabilities-with-ssvc-framework": "off", + "tvos-design-guidelines": "off", + "typegpu": "off", + "typography-audit": "off", + "ubiquitous-language": "off", + "ugc-strategy": "off", + "ui-animation": "off", + "ui-audit": "off", + "ui-demo": "off", + "ui-design": "off", + "ui-ux-pro-max": "off", + "unfreeze": "off", + "unified-notifications-ops": "off", + "unit-economics": "off", + "usability-tester": "off", + "using-git-worktrees": "off", + "using-superpowers": "off", + "ux-audit": "off", + "ux-designer": "off", + "ux-enhancer": "off", + "validated-build": "off", + "validating-backup-integrity-for-recovery": "off", + "value-creation-plan": "off", + "vercel-composition-patterns": "off", + "vercel-react-best-practices": "off", + "vercel-react-native-skills": "off", + "vercel-react-view-transitions": "off", + "verification-before-completion": "off", + "verification-loop": "off", + "versions": "off", + "video": "off", + "video-editing": "off", + "video-producer": "off", + "video-toolkit": "off", + "videodb": "off", + "visa-doc-translate": "off", + "visionos-design-guidelines": "off", + "visual-designer": "off", + "voice-clone": "off", + "waapi": "off", + "watchos-design-guidelines": "off", + "wb-seller-api": "off", + "web-design-guidelines": "off", + "web-design-reviewer": "off", + "web-quality-audit": "off", + "web-video-presentation": "off", + "webapp-testing": "off", + "website-builder-setup": "off", + "website-to-hyperframes": "off", + "whatsapp-marketing": "off", + "windows-desktop-e2e": "off", + "workspace-surface-audit": "off", + "write-a-skill": "off", + "writing-beats": "off", + "writing-fragments": "off", + "writing-plans": "off", + "writing-shape": "off", + "writing-skills": "off", + "x-api": "off", + "xlsx-author": "off", + "yandex-metrika": "off", + "yandex-wordstat": "off", + "yookassa": "off", + "zoom-out": "off", + "caveman": "full", + "graphify": "full", + "humanizer": "full", + "humanizer-legal": "full", + "humanizer-ru": "full", + "local-doc-ops": "full", + "organize": "full", + "pdf": "full", + "self-learning": "full", + "task-brief": "full", + "askacouncil": "full", + "themis-update": "full", + "position-council": "full", + "doc-drafter": "full" + }, + "disableBundledSkills": true +} \ No newline at end of file diff --git a/.claude/settings.json.bak-20260802-170350 b/.claude/settings.json.bak-20260802-170350 new file mode 100644 index 0000000..be1478e --- /dev/null +++ b/.claude/settings.json.bak-20260802-170350 @@ -0,0 +1,25 @@ +{ + "hooks": { + "PreToolUse": [ + { + "matcher": "Read|Write|Edit|NotebookEdit|Bash", + "hooks": [ + { + "type": "command", + "command": "python3 \"$CLAUDE_PROJECT_DIR/scripts/claude_guard.py\"" + } + ] + } + ], + "Stop": [ + { + "hooks": [ + { + "type": "command", + "command": "mkdir -p \"$CLAUDE_PROJECT_DIR/cases/_logs\" && echo \"Session ended: $(date '+%d.%m.%Y %H:%M')\" >> \"$CLAUDE_PROJECT_DIR/cases/_logs/_session_history.txt\"" + } + ] + } + ] + } +} diff --git a/scripts/verify_act.py b/scripts/verify_act.py index 38e0270..09232c2 100644 --- a/scripts/verify_act.py +++ b/scripts/verify_act.py @@ -9,28 +9,53 @@ сверка вскрыла, что 13.06.2019 у Определения № 81-КГ19-2 — дата публикации на портале, а не дата судебного акта. -Использование: - python3 scripts/verify_act.py 81-КГ19-2 5-КГ22-82-К2 - python3 scripts/verify_act.py --json 41-КГ16-17 - python3 scripts/verify_act.py --url https://... 56-КГ23-6-К9 +ЧТО БЫЛО СЛОМАНО (аудит 02.08.2026). Прежняя версия подставляла в шаблон URL +пустую дату (`t.format(d="")`), получала адрес вида `...-ot--n-81-kg19-2/`, +всегда ловила 404 и выдавала «НЕ НАЙДЕН» одинаково реальному акту и +выдуманному. За всю историю проекта машинно проверено 2 акта из 250 — оба +руками через `--url`. Барьер против выдуманной практики не существовал. -Выход: таблица «акт → статус → дата в тексте → предмет → источник». -Статусы: ПОДТВЕРЖДЕН · НЕ НАЙДЕН · РАСХОЖДЕНИЕ (номер есть, дата спорна). +ПРИНЦИП ПОСЛЕ ПОЧИНКИ (решение совета, Н1). Пара «номер + дата» от охотника — +это КАНДИДАТ, а не факт. Фактом становится то, что подтвердила страница +публикатора. Модель, выдумавшая акт, выдумает и дату к нему, поэтому проверять +надо обе величины разом: несовпадение даты при существующем номере — сигнал, +что модель ошиблась в реквизите. + +Статусы (несуществование акта и недоступность канала — РАЗНЫЕ вещи): + ПОДТВЕРЖДЕН — номер и заявленная дата найдены в тексте акта + РАСХОЖДЕНИЕ — номер есть, дата в тексте другая (сверить: дата акта или публикации) + НЕ ПОДТВЕРЖДЕН — страница не найдена. НЕ основание утверждать, что акта нет + КАНАЛ НЕДОСТУПЕН — сеть или публикатор не отвечают. Проверка НЕ выполнена + +Использование: + python3 scripts/verify_act.py 81-КГ19-2@26.03.2019 5-КГ22-82-К2@04.10.2022 + python3 scripts/verify_act.py --json 41-КГ16-17@17.05.2016 + python3 scripts/verify_act.py --url https://... 56-КГ23-6-К9 + python3 scripts/verify_act.py --emit 01_context/_practice/verified.json 81-КГ19-2@26.03.2019 + python3 scripts/verify_act.py --demo # самопроверка разбора и сборки URL ponytail: кеш на диске, без БД — актов десятки, не миллионы. """ import argparse +import hashlib import json import os import re import subprocess import sys +from datetime import datetime, timezone ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) FETCH = os.path.join(ROOT, "scripts", "fetch_url.sh") CACHE = os.path.expanduser("~/.cache/legal_acts") -# Шаблоны публикаторов. Порядок = приоритет доверия. +PARSER_VERSION = "2026.08.02" +MIN_PAGE_BYTES = 2000 # меньше — это страница ошибки, кешировать её нельзя + +# Шаблоны публикаторов. {d} — дата акта в формате ДДММГГГГ, {slug} — номер латиницей. +# Порядок = приоритет доверия. Оба реально отдают 200 (проверено 02.08.2026): +# .../opredelenie-verkhovnogo-suda-rf-ot-17052016-n-41-kg16-17/ +# .../opredelenie-sudebnoi-kollegii-...-ot-04102022-n-5-kg22-82-k2/ SOURCES = [ ("legalacts.ru", "https://legalacts.ru/sud/opredelenie-verkhovnogo-suda-rf-ot-{d}-n-{slug}/"), ("legalacts.ru", "https://legalacts.ru/sud/opredelenie-sudebnoi-kollegii-po-grazhdanskim-" @@ -61,15 +86,44 @@ def slugify(num: str) -> str: return num.translate(table).lower() -def fetch(url: str, dest: str) -> bool: - if os.path.exists(dest) and os.path.getsize(dest) > 2000: - return True +def parse_arg(raw: str) -> tuple[str, str | None]: + """`81-КГ19-2@26.03.2019` -> ('81-КГ19-2', '26.03.2019'). Дата необязательна.""" + if "@" in raw: + num, date = raw.split("@", 1) + return num.strip(), date.strip() + return raw.strip(), None + + +def url_date(date: str) -> str | None: + """26.03.2019 -> 26032019. Кривая дата — None, а не молчаливый мусор.""" + m = DOT_DATE_RE.fullmatch(date or "") + return f"{m.group(1)}{m.group(2)}{m.group(3)}" if m else None + + +def fetch(url: str, dest: str) -> str: + """Возвращает 'cached' | 'ok' | 'small' | 'unreachable'. + + Страницы меньше MIN_PAGE_BYTES не кешируются: это заглушки 404, из-за + которых прежняя версия накопила шесть файлов по 302 байта и считала их + результатом проверки. + """ + if os.path.exists(dest) and os.path.getsize(dest) > MIN_PAGE_BYTES: + return "cached" os.makedirs(os.path.dirname(dest), exist_ok=True) + tmp = dest + ".tmp" try: - subprocess.run(["bash", FETCH, url, dest], capture_output=True, timeout=60) + r = subprocess.run(["bash", FETCH, url, tmp], capture_output=True, timeout=60) except subprocess.TimeoutExpired: - return False - return os.path.exists(dest) and os.path.getsize(dest) > 2000 + return "unreachable" + if not os.path.exists(tmp): + return "unreachable" + size = os.path.getsize(tmp) + if size <= MIN_PAGE_BYTES: + os.remove(tmp) + # fetch_url.sh отдаёт !=0, когда не смог достать страницу вообще + return "unreachable" if r.returncode != 0 else "small" + os.replace(tmp, dest) + return "ok" def strip_tags(html: str) -> str: @@ -78,11 +132,32 @@ def strip_tags(html: str) -> str: return re.sub(r"\s+", " ", txt) -def analyze(text: str, num: str) -> dict: - """Ищет номер, даты, состав, предмет. Возвращает вердикт.""" +def find_act_date(text: str, num: str) -> str | None: + """Дата САМОГО АКТА — та, что стоит после «от» перед номером. + + «...определение от 26.03.2019 № 81-КГ19-2 13.06.2019 | Судебные решения...» + Первая дата — акта, вторая — публикации на портале. Различить их можно + только по позиции: дата акта идёт в связке «от <дата> № <номер>». + """ + for m in re.finditer(re.escape(num), text): + window = text[max(0, m.start() - 200):m.start()] + found = None + for d in re.finditer(r"от\s+(\d{2})\.(\d{2})\.(\d{4})", window): + found = ".".join(d.groups()) + for d in re.finditer(r"от\s+(\d{1,2})\s+(" + "|".join(MONTHS) + r")\s+(\d{4})", window): + day, mon, y = d.groups() + found = f"{int(day):02d}.{MONTHS.index(mon) + 1:02d}.{y}" + if found: + return found + return None + + +def analyze(text: str, num: str, claimed_date: str | None = None) -> dict: + """Ищет номер, даты, состав, предмет. Сверяет заявленную дату с текстом.""" hits = text.count(num) if not hits: - return {"status": "НЕ НАЙДЕН", "hits": 0, "dates": [], "collegium": "", "subject": ""} + return {"status": "НЕ ПОДТВЕРЖДЕН", "hits": 0, "dates": [], + "collegium": "", "subject": "", "date_match": None} # Даты собираем вокруг КАЖДОГО вхождения номера: первое обычно приходится # на заголовок страницы, где даты рядом нет (проверено на eg-online.ru). @@ -104,73 +179,158 @@ def analyze(text: str, num: str) -> dict: subj = v break - status = "ПОДТВЕРЖДЕН" if dates else "РАСХОЖДЕНИЕ" - if len(dates) > 1: - status = "РАСХОЖДЕНИЕ" - return {"status": status, "hits": hits, "dates": dates, - "collegium": col.group(1) if col else "", "subject": subj} + act_date = find_act_date(text, num) + + # Заявленная охотником дата — кандидат. Решает страница. + # Простого «дата есть где-то на странице» НЕДОСТАТОЧНО: рядом с номером + # почти всегда стоит и дата публикации на портале. Именно на этом + # споткнулись два рецензента совета по № 81-КГ19-2 (26.03.2019 — акт, + # 13.06.2019 — публикация). Сверяем только с датой, идущей после «от». + date_match = None + if claimed_date: + if act_date: + date_match = claimed_date == act_date + status = "ПОДТВЕРЖДЕН" if date_match else "РАСХОЖДЕНИЕ" + else: + date_match = claimed_date in dates + status = "РАСХОЖДЕНИЕ" # дату акта не опознали — на ручную сверку + else: + status = "ПОДТВЕРЖДЕН" if act_date and len(dates) == 1 else "РАСХОЖДЕНИЕ" + + return {"status": status, "hits": hits, "dates": dates, "act_date": act_date, + "collegium": col.group(1) if col else "", "subject": subj, + "date_match": date_match} -def verify(num: str, url: str | None = None) -> dict: - dest = os.path.join(CACHE, slugify(num) + ".html") - urls = [url] if url else [t.format(d="", slug=slugify(num)) for _, t in SOURCES] +def snapshot(path: str, text: str) -> dict: + """Слепок источника: без него conformance-прогон невоспроизводим (Н13).""" + raw = open(path, "rb").read() + return { + "raw_sha256": hashlib.sha256(raw).hexdigest(), + "normalized_sha256": hashlib.sha256(text.encode("utf-8")).hexdigest(), + "fetched_at": datetime.now(timezone.utc).isoformat(timespec="seconds"), + "parser_version": PARSER_VERSION, + "bytes": len(raw), + } + + +def verify(num: str, claimed_date: str | None = None, url: str | None = None) -> dict: + """Проверяет акт. Пустой результат = 'не подтверждён', НЕ 'не существует'.""" + base = {"act": num, "claimed_date": claimed_date, "hits": 0, "dates": [], + "collegium": "", "subject": "", "date_match": None, "url": "", + "snapshot": None} + + if url: + urls = [url] + elif claimed_date: + d = url_date(claimed_date) + if not d: + return {**base, "status": "НЕ ПОДТВЕРЖДЕН", + "note": f"дата «{claimed_date}» не в формате ДД.ММ.ГГГГ"} + urls = [t.format(d=d, slug=slugify(num)) for _, t in SOURCES] + else: + return {**base, "status": "НЕ ПОДТВЕРЖДЕН", + "note": "нужна дата акта (номер@ДД.ММ.ГГГГ) либо прямой --url"} + + unreachable = 0 for u in urls: - if not u: + dest = os.path.join(CACHE, f"{slugify(num)}_{url_date(claimed_date or '') or 'direct'}.html") + state = fetch(u, dest) + if state == "unreachable": + unreachable += 1 continue - if fetch(u, dest): - text = strip_tags(open(dest, encoding="utf-8", errors="ignore").read()) - res = analyze(text, num) - res["url"] = u - res["act"] = num - if res["status"] != "НЕ НАЙДЕН": - return res - return {"act": num, "status": "НЕ НАЙДЕН", "hits": 0, "dates": [], - "collegium": "", "subject": "", "url": urls[0] if urls else ""} + if state == "small": + continue + text = strip_tags(open(dest, encoding="utf-8", errors="ignore").read()) + res = analyze(text, num, claimed_date) + if res["status"] != "НЕ ПОДТВЕРЖДЕН": + return {**base, **res, "url": u, "snapshot": snapshot(dest, text)} + + if unreachable == len(urls): + return {**base, "status": "КАНАЛ НЕДОСТУПЕН", "url": urls[0], + "note": "публикатор не ответил — проверка НЕ выполнена"} + return {**base, "status": "НЕ ПОДТВЕРЖДЕН", "url": urls[0], + "note": "страница не найдена по номеру и дате"} def main() -> int: ap = argparse.ArgumentParser(description="Верификация реквизитов судебных актов") - ap.add_argument("acts", nargs="+", help="номера, напр. 81-КГ19-2") + ap.add_argument("acts", nargs="+", help="номер@ДД.ММ.ГГГГ, напр. 81-КГ19-2@26.03.2019") ap.add_argument("--url", help="прямой URL (для одного акта)") ap.add_argument("--json", action="store_true", help="выводить JSON") + ap.add_argument("--emit", metavar="FILE", help="дописать результаты в ledger (JSON)") a = ap.parse_args() - out = [verify(n, a.url if len(a.acts) == 1 else None) for n in a.acts] + pairs = [parse_arg(x) for x in a.acts] + out = [verify(n, d, a.url if len(pairs) == 1 else None) for n, d in pairs] + + if a.emit: + os.makedirs(os.path.dirname(os.path.abspath(a.emit)), exist_ok=True) + prev = {} + if os.path.exists(a.emit): + try: + prev = {r["act"]: r for r in json.load(open(a.emit, encoding="utf-8"))} + except (json.JSONDecodeError, KeyError, TypeError): + prev = {} + prev.update({r["act"]: r for r in out}) + with open(a.emit, "w", encoding="utf-8") as f: + json.dump(list(prev.values()), f, ensure_ascii=False, indent=2) + print(f"ledger обновлен: {a.emit} ({len(prev)} актов)", file=sys.stderr) if a.json: print(json.dumps(out, ensure_ascii=False, indent=2)) return 0 - print(f"{'АКТ':<18}{'СТАТУС':<14}{'ДАТЫ В ТЕКСТЕ':<26}{'ПРЕДМЕТ':<28}ВХОЖД.") - print("-" * 96) + print(f"{'АКТ':<18}{'ЗАЯВЛЕНО':<13}{'СТАТУС':<18}{'ДАТЫ В ТЕКСТЕ':<26}{'ПРЕДМЕТ':<26}ВХОЖД.") + print("-" * 112) for r in out: - print(f"{r['act']:<18}{r['status']:<14}{', '.join(r['dates'])[:24]:<26}" - f"{r['subject'][:26]:<28}{r['hits']}") - print("-" * 96) - print("ПОДТВЕРЖДЕН — номер и дата найдены в тексте акта.") - print("РАСХОЖДЕНИЕ — номер есть, дат несколько: сверить, какая дата акта, " - "а какая дата публикации.") - print("НЕ НАЙДЕН — в открытых публикаторах не обнаружен, в документ не включать.") + print(f"{r['act']:<18}{(r.get('claimed_date') or '—'):<13}{r['status']:<18}" + f"{', '.join(r['dates'])[:24]:<26}{r['subject'][:24]:<26}{r['hits']}") + if r.get("note"): + print(f"{'':<18}└─ {r['note']}") + print("-" * 112) + print("ПОДТВЕРЖДЕН — номер и заявленная дата найдены в тексте акта.") + print("РАСХОЖДЕНИЕ — номер есть, дата другая: сверить, где дата акта, где публикации.") + print("НЕ ПОДТВЕРЖДЕН — страница не найдена. НЕ означает, что акта не существует:") + print(" до подачи акт подтверждает владелец лично (HUMAN_ATTESTED).") + print("КАНАЛ НЕДОСТУПЕН — публикатор не ответил. Проверка НЕ выполнена, повторить.") return 0 def demo() -> None: - """Самопроверка разбора без сети: главный риск — путаница даты акта - и даты публикации, ровно она стоила совету двух рецензентов.""" + """Самопроверка без сети. Покрывает и разбор, и сборку URL — прежняя версия + падала именно на URL, а demo его не трогал и потому проходил.""" + # 1. Дата акта против даты публикации — ровно та ловушка, что стоила совету двух рецензентов. sample = ("Главная Документы Судебные решения О разделе совместно нажитого имущества " "Верховный Суд РФ определение от 26.03.2019 № 81-КГ19-2 13.06.2019 | " "Судебные решения Судебная коллегия по гражданским делам в составе: " "председательствующего Юрьева И.М., судей Назаренко Т.Н.") - r = analyze(sample, "81-КГ19-2") - assert r["hits"] == 1, r - assert "26.03.2019" in r["dates"], r - assert r["status"] == "РАСХОЖДЕНИЕ", "две даты рядом обязаны дать РАСХОЖДЕНИЕ" - assert r["subject"] == "раздел имущества супругов", r - assert r["collegium"].startswith("Юрьева"), r + r = analyze(sample, "81-КГ19-2", "26.03.2019") + assert r["hits"] == 1 and r["date_match"] is True, r + assert r["act_date"] == "26.03.2019", f"дата акта берётся после «от»: {r}" + assert r["status"] == "ПОДТВЕРЖДЕН", "заявленная дата совпала с датой акта" + assert r["subject"] == "раздел имущества супругов" and r["collegium"].startswith("Юрьева"), r - empty = analyze("текст без нужного номера", "5-КГ21-101-К2") - assert empty["status"] == "НЕ НАЙДЕН", empty - print("demo: разбор корректен, дата акта и дата публикации различаются") + # 2. Модель назвала дату публикации вместо даты акта — обязано быть РАСХОЖДЕНИЕ. + r2 = analyze(sample, "81-КГ19-2", "13.06.2019") + assert r2["status"] == "РАСХОЖДЕНИЕ" and r2["date_match"] is False, r2 + assert "13.06.2019" in r2["dates"], "дата публикации на странице есть — но она не дата акта" + + # 3. Номера нет в тексте. + assert analyze("текст без нужного номера", "5-КГ21-101-К2")["status"] == "НЕ ПОДТВЕРЖДЕН" + + # 4. СБОРКА URL — то, что было сломано: дата обязана попасть в адрес. + u = SOURCES[0][1].format(d=url_date("17.05.2016"), slug=slugify("41-КГ16-17")) + assert u == ("https://legalacts.ru/sud/" + "opredelenie-verkhovnogo-suda-rf-ot-17052016-n-41-kg16-17/"), u + assert "ot--n-" not in u, "пустая дата в URL — тот самый дефект" + assert url_date("кривая дата") is None, "кривую дату не подставлять молча" + + # 5. Разбор аргумента «номер@дата». + assert parse_arg("81-КГ19-2@26.03.2019") == ("81-КГ19-2", "26.03.2019") + assert parse_arg("81-КГ19-2") == ("81-КГ19-2", None) + + print("demo: разбор, сверка даты и сборка URL корректны") if __name__ == "__main__":