[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71NFH6HSXDG3AFP0E7NHABV":3,"skill-same:01M71NFH6HSXDG3AFP0E7NHABV":110},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M71NFH6HSXDG3AFP0E7NHABV","ln-642-layer-ownership-boundary-auditor",null,"Checks layer, resource ownership, and orchestration boundaries. Use when auditing architecture boundary enforcement.","vitalikpestov\u002FSkills-Catalog","vitalikpestov","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F13882997?v=4","01M71N4QG0CWRXX4R24JQZXDDQ","Vitalik Pestov","01M71N4QGMSYRW607DDSE0CQMM",2,"MIT","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"ln","boundary","ownership","auditor","ln 642 layer ownership boundary auditor","layer","graph","paths","read","line","references","analyze","architecture","Bash","when","orchestration","MCP","hex","search","inspect","2026-11-10 10:56:23",false,"---\nname: ln-642-layer-ownership-boundary-auditor\ndescription: \"Checks layer, resource ownership, and orchestration boundaries. Use when auditing architecture boundary enforcement.\"\nallowed-tools: Read, Grep, Glob, Bash, mcp__hex-graph__find_references, mcp__hex-graph__trace_paths, mcp__hex-graph__inspect_symbol, mcp__hex-graph__analyze_architecture, mcp__hex-line__read_file, mcp__hex-line__grep_search, mcp__hex-line__outline\nlicense: MIT\n---\n\n> **Paths:** File paths (`references\u002F`, `..\u002Fln-*`) are relative to this skill directory.\n\n# Layer & Ownership Boundary Auditor\n\n**Type:** L3 Worker\n\nL3 Worker that audits architectural layer boundaries and detects violations.\n\n## Purpose & Scope\n\n- Read architecture.md to discover project's layer structure\n- Detect layer violations (I\u002FO code outside infrastructure layer)\n- **Detect cross-layer consistency issues:**\n  - Transaction boundaries (commit\u002Frollback ownership)\n  - Session ownership (DI vs local)\n- Check pattern coverage (all HTTP calls use client abstraction)\n- Detect error handling duplication\n- Return violations list\n\n**Out of Scope:**\n- Blocking I\u002FO in async functions (sync open\u002Fread in async def)\n- Fire-and-forget tasks (create_task without error handler)\n\n## Input\n\n```\n- architecture_path: string    # Path to docs\u002Farchitecture.md\n- codebase_root: string        # Root directory to scan\n- skip_violations: string[]    # Files to skip (legacy)\n- output_dir: string           # e.g., \".hex-skills\u002Fruntime-artifacts\u002Fruns\u002F{run_id}\u002Faudit-report\"\n\n# Domain-aware (optional)\n- domain_mode: \"global\" | \"domain-aware\"   # Default: \"global\"\n- current_domain: string                   # e.g., \"users\", \"billing\" (only if domain-aware)\n- scan_path: string                        # e.g., \"src\u002Fusers\u002F\" (only if domain-aware)\n```\n\n**When domain_mode=\"domain-aware\":** Use `scan_path` instead of `codebase_root` for all Grep\u002FGlob operations. Tag all findings with `domain` field.\n\n## Workflow\n\nDetection policy: use two-layer detection (candidate scan, then context verification); load `references\u002Ftwo_layer_detection.md` only when the verification method is ambiguous.\nTool policy: follow host AGENTS.md MCP preferences; load `references\u002Fmcp_tool_preferences.md` and `references\u002Fmcp_integration_patterns.md` only when host policy is absent or MCP behavior is unclear.\n\nUse `hex-graph` first when references, call paths, or architecture coupling materially improve the audit. Use `hex-line` first for local code and config reads when available. If MCP is unavailable, unsupported, or not indexed, continue with built-in `Read\u002FGrep\u002FGlob\u002FBash` and state the fallback in the report.\n\n### Phase 1: Discover Architecture\n\n**MANDATORY READ:** Load `references\u002Flayer_rules.md` -- use Architecture Presets (fallback), I\u002FO Pattern Boundary Rules (Phase 2), Coverage Checks (Phase 4), Cross-Layer Consistency rules (Phase 3).\n\n```\nRead docs\u002Farchitecture.md\n\nExtract from Section 4.2 (Top-Level Decomposition):\n  - architecture_type: \"Layered\" | \"Hexagonal\" | \"Clean\" | \"MVC\" | etc.\n  - layers: [{name, directories[], purpose}]\n\nExtract from Section 5.3 (Infrastructure Layer Components):\n  - infrastructure_components: [{name, responsibility}]\n\nIF architecture.md not found:\n  Use fallback presets from layer_rules.md\n\nBuild ruleset:\n  FOR EACH layer:\n    allowed_deps = layers that can be imported\n    forbidden_deps = layers that cannot be imported\n```\n\n\n**Graph acceleration (if available):** IF `contextStore.graph_indexed` OR `.hex-skills\u002Fcodegraph\u002Findex.db` exists:\n- **Module coupling:** `analyze_architecture(path=scan_root, verbosity=\"full\")` -- use returned coupling metrics to identify tightly-coupled layers.\n- **Cross-layer calls:** `find_references(symbol)` for transaction\u002Fsession functions -- trace commit\u002Frollback ownership across layers.\n- **Orchestration depth:** `trace_paths(name=\"ServiceFn\", file=\"...\", path_kind=\"calls\", direction=\"forward\", depth=3, path=scan_root)` -- measure chain depth for flat orchestration check from a concrete service symbol.\n- Empty `trace_paths` from a coarse or module-level selector is not enough to clear a layer; fall back to `inspect_symbol` or grep\u002Fmanual review when the selector is broad.\n- Fall back to grep-based detection below if graph unavailable.\n### Phase 2: Detect Layer Violations\n\n```\nscan_root = scan_path IF domain_mode == \"domain-aware\" ELSE codebase_root\n\nFOR EACH violation_type IN layer_rules.md I\u002FO Pattern Boundary Rules:\n  grep_pattern = violation_type.detection_grep\n  forbidden_dirs = violation_type.forbidden_in\n\n  matches = Grep(grep_pattern, scan_root, include=\"*.py,*.ts,*.js\")\n\n  FOR EACH match IN matches:\n    IF match.path NOT IN skip_violations:\n      IF any(forbidden IN match.path FOR forbidden IN forbidden_dirs):\n        violations.append({\n          type: \"layer_violation\",\n          severity: \"HIGH\",\n          pattern: violation_type.name,\n          file: match.path,\n          line: match.line,\n          code: match.context,\n          allowed_in: violation_type.allowed_in,\n          suggestion: f\"Move to {violation_type.allowed_in}\"\n        })\n```\n\n### Phase 3: Cross-Layer Consistency Checks\n\n#### 3.1 Transaction Boundary Violations\n\n**What:** commit()\u002Frollback() called at inconsistent layers (repo + service + API)\n\n**Detection:**\n```\nrepo_commits = Grep(\"\\.commit\\(\\)|\\.rollback\\(\\)\", \"**\u002Frepositories\u002F**\u002F*.py\")\nservice_commits = Grep(\"\\.commit\\(\\)|\\.rollback\\(\\)\", \"**\u002Fservices\u002F**\u002F*.py\")\napi_commits = Grep(\"\\.commit\\(\\)|\\.rollback\\(\\)\", \"**\u002Fapi\u002F**\u002F*.py\")\n\nlayers_with_commits = count([repo_commits, service_commits, api_commits].filter(len > 0))\n```\n\n**Safe Patterns (ignore):**\n- Comment \"# best-effort telemetry\" in same context\n- File ends with `_callbacks.py` (progress notifiers)\n- Explicit `# UoW boundary` comment\n\n**Violation Rules:**\n\n| Condition | Severity | Issue |\n|-----------|----------|-------|\n| layers_with_commits >= 3 | CRITICAL | Mixed UoW ownership across all layers |\n| repo + api commits | HIGH | Transaction control bypasses service layer |\n| repo + service commits | HIGH | Ambiguous UoW owner (repo vs service) |\n| service + api commits | MEDIUM | Transaction control spans service + API |\n\n**Exception:** Saga pattern \u002F distributed transactions with explicit compensating actions -> downgrade CRITICAL to MEDIUM. UoW boundary documented with `\u002F\u002F architecture decision` or ADR -> skip.\n\n**Recommendation:** Choose single UoW owner (service layer recommended), remove commit() from other layers\n\n**Effort:** L (requires architectural decision + refactoring)\n\n#### 3.2 Session Ownership Violations\n\n**What:** Mixed DI-injected and locally-created sessions in same call chain\n\n**Detection:**\n```\ndi_session = Grep(\"Depends\\(get_session\\)|Depends\\(get_db\\)\", \"**\u002Fapi\u002F**\u002F*.py\")\nlocal_session = Grep(\"AsyncSessionLocal\\(\\)|async_sessionmaker\", \"**\u002Fservices\u002F**\u002F*.py\")\nlocal_in_repo = Grep(\"AsyncSessionLocal\\(\\)\", \"**\u002Frepositories\u002F**\u002F*.py\")\n```\n\n**Violation Rules:**\n\n| Condition | Severity | Issue |\n|-----------|----------|-------|\n| di_session AND local_in_repo in same module | HIGH | Repo creates own session while API injects different |\n| local_session in service calling DI-based repo | MEDIUM | Session mismatch in call chain |\n\n**Recommendation:** Use DI consistently OR use local sessions consistently. Document exceptions (e.g., telemetry)\n\n**Effort:** M\n\n#### 3.3 Flat Orchestration Violations\n\n**What:** Service-layer functions calling other services that call yet other services -- deep orchestration chains.\n\n**Detection:** **MANDATORY READ:** Load `references\u002Fai_ready_architecture.md` -- map service imports, find chain depth.\n\n**Violation Rules:**\n\n| Condition | Severity | Issue |\n|-----------|----------|-------|\n| Service chain >= 3 (A->B->C->D) | HIGH | Deep orchestration |\n| Service chain = 2 (A->B->C) | MEDIUM | Consider flattening |\n\n**Recommendation:** Extract orchestrator calling all services at same level. Each service becomes a sink.\n\n**Effort:** L\n\n---\n\n### Phase 4: Check Pattern Coverage\n\n```\n# HTTP Client Coverage\nall_http_calls = Grep(\"httpx\\\\.|aiohttp\\\\.|requests\\\\.\", codebase_root)\nabstracted_calls = Grep(\"client\\\\.(get|post|put|delete)\", infrastructure_dirs)\n\nIF len(all_http_calls) > 0:\n  coverage = len(abstracted_calls) \u002F len(all_http_calls) * 100\n  IF coverage \u003C 90%:\n    violations.append({\n      type: \"low_coverage\",\n      severity: \"MEDIUM\",\n      pattern: \"HTTP Client Abstraction\",\n      coverage: coverage,\n      uncovered_files: files with direct calls outside infrastructure\n    })\n\n# Error Handling Duplication\nhttp_error_handlers = Grep(\"except\\\\s+(httpx\\\\.|aiohttp\\\\.|requests\\\\.)\", codebase_root)\nunique_files = set(f.path for f in http_error_handlers)\n\nIF len(unique_files) > 2:\n  violations.append({\n    type: \"duplication\",\n    severity: \"MEDIUM\",\n    pattern: \"HTTP Error Handling\",\n    files: list(unique_files),\n    suggestion: \"Centralize in infrastructure layer\"\n  })\n```\n\n### Phase 5: Calculate Score\n\n**MANDATORY READ:** Load `references\u002Faudit_worker_core_contract.md` and `references\u002Faudit_scoring.md`.\n\n### Phase 6: Write Report\n\n**MANDATORY READ:** Load `references\u002Ftemplates\u002Faudit_worker_report_template.md`.\n\nWrite JSON summary per `references\u002Faudit_summary_contract.md`. In managed mode the caller passes both `runId` and `summaryArtifactPath`; in standalone mode the worker generates its own run-scoped artifact path per shared contract.\n\n```\n# Build markdown report in memory with:\n# - AUDIT-META (standard penalty-based: score, counts)\n# - Checks table (io_isolation, http_abstraction, error_centralization, transaction_boundary, session_ownership)\n# - Findings table (violations sorted by severity)\n# - DATA-EXTENDED: {architecture, coverage}\n\nIF domain_mode == \"domain-aware\":\n  Write to {output_dir}\u002F642-layer-boundary-{current_domain}.md\nELSE:\n  Write to {output_dir}\u002F642-layer-boundary.md\n```\n\n### Phase 7: Return Summary\n\n```\nReport written: .hex-skills\u002Fruntime-artifacts\u002Fruns\u002F{run_id}\u002Faudit-report\u002F642-layer-boundary-users.md\nScore: 4.5\u002F10 | Issues: 8 (C:1 H:3 M:4 L:0)\n```\n\n## Critical Rules\n\nApply the already-loaded `references\u002Faudit_worker_core_contract.md`.\n\n- **Read architecture.md first** - never assume architecture type\n- **Skip violations list** - respect legacy files marked for gradual fix\n- **File + line + code** - always provide exact location with context\n- **Actionable suggestions** - always tell WHERE to move the code\n- **No false positives** - verify path contains forbidden dir, not just substring\n- **Unique angle:** Audit layer, ownership, and orchestration boundaries only. Do not audit package health, generic code quality, dependency graph topology, or runtime concurrency hazards.\n- **Action required:** Every finding uses `MOVE_BOUNDARY`, `CHOOSE_OWNER`, or `FLATTEN_ORCHESTRATION`.\n\n## Definition of Done\n\nApply the already-loaded `references\u002Faudit_worker_core_contract.md`.\n\n- [ ] Architecture discovered from docs\u002Farchitecture.md (or fallback used)\n- [ ] All violation types from layer_rules.md checked\n- [ ] **Cross-layer consistency checked:**\n  - Transaction boundaries analyzed (commit\u002Frollback distribution)\n  - Session ownership analyzed (DI vs local)\n- [ ] Coverage calculated for HTTP abstraction + 2 consistency metrics\n- [ ] Violations list with severity, location, suggestion\n- [ ] If domain-aware: all Grep scoped to scan_path, findings tagged with domain\n- [ ] Report written to `{output_dir}\u002F642-layer-boundary[-{domain}].md` (atomic single Write call)\n- [ ] Summary written per contract\n\n## Reference Files\n\n- Layer rules: `references\u002Flayer_rules.md`\n- Scoring impact: use `references\u002Faudit_scoring.md`\n\n---\n\n**Version:** 2.1.0\n**Last Updated:** 2026-02-08\n","> **Paths:** File paths (`references\u002F`, `..\u002Fln-*`) are relative to this skill directory.\n\n# Layer & Ownership Boundary Auditor\n\n**Type:** L3 Worker\n\nL3 Worker that audits architectural layer boundaries and detects violations.\n\n## Purpose & Scope\n\n- Read architecture.md to discover project's layer structure\n- Detect layer violations (I\u002FO code outside infrastructure layer)\n- **Detect cross-layer consistency issues:**\n  - Transaction boundaries (commit\u002Frollback ownership)\n  - Session ownership (DI vs local)\n- Check pattern coverage (all HTTP calls use client abstraction)\n- Detect error handling duplication\n- Return violations list\n\n**Out of Scope:**\n- Blocking I\u002FO in async functions (sync open\u002Fread in async def)\n- Fire-and-forget tasks (create_task without error handler)\n\n## Input\n\n```\n- architecture_path: string    # Path to docs\u002Farchitecture.md\n- codebase_root: string        # Root directory to scan\n- skip_violations: string[]    # Files to skip (legacy)\n- output_dir: string           # e.g., \".hex-skills\u002Fruntime-artifacts\u002Fruns\u002F{run_id}\u002Faudit-report\"\n\n# Domain-aware (optional)\n- domain_mode: \"global\" | \"domain-aware\"   # Default: \"global\"\n- current_domain: string                   # e.g., \"users\", \"billing\" (only if domain-aware)\n- scan_path: string                        # e.g., \"src\u002Fusers\u002F\" (only if domain-aware)\n```\n\n**When domain_mode=\"domain-aware\":** Use `scan_path` instead of `codebase_root` for all Grep\u002FGlob operations. Tag all findings with `domain` field.\n\n## Workflow\n\nDetection policy: use two-layer detection (candidate scan, then context verification); load `references\u002Ftwo_layer_detection.md` only when the verification method is ambiguous.\nTool policy: follow host AGENTS.md MCP preferences; load `references\u002Fmcp_tool_preferences.md` and `references\u002Fmcp_integration_patterns.md` only when host policy is absent or MCP behavior is unclear.\n\nUse `hex-graph` first when references, call paths, or architecture coupling materially improve the audit. Use `hex-line` first for local code and config reads when available. If MCP is unavailable, unsupported, or not indexed, continue with built-in `Read\u002FGrep\u002FGlob\u002FBash` and state the fallback in the report.\n\n### Phase 1: Discover Architecture\n\n**MANDATORY READ:** Load `references\u002Flayer_rules.md` -- use Architecture Presets (fallback), I\u002FO Pattern Boundary Rules (Phase 2), Coverage Checks (Phase 4), Cross-Layer Consistency rules (Phase 3).\n\n```\nRead docs\u002Farchitecture.md\n\nExtract from Section 4.2 (Top-Level Decomposition):\n  - architecture_type: \"Layered\" | \"Hexagonal\" | \"Clean\" | \"MVC\" | etc.\n  - layers: [{name, directories[], purpose}]\n\nExtract from Section 5.3 (Infrastructure Layer Components):\n  - infrastructure_components: [{name, responsibility}]\n\nIF architecture.md not found:\n  Use fallback presets from layer_rules.md\n\nBuild ruleset:\n  FOR EACH layer:\n    allowed_deps = layers that can be imported\n    forbidden_deps = layers that cannot be imported\n```\n\n\n**Graph acceleration (if available):** IF `contextStore.graph_indexed` OR `.hex-skills\u002Fcodegraph\u002Findex.db` exists:\n- **Module coupling:** `analyze_architecture(path=scan_root, verbosity=\"full\")` -- use returned coupling metrics to identify tightly-coupled layers.\n- **Cross-layer calls:** `find_references(symbol)` for transaction\u002Fsession functions -- trace commit\u002Frollback ownership across layers.\n- **Orchestration depth:** `trace_paths(name=\"ServiceFn\", file=\"...\", path_kind=\"calls\", direction=\"forward\", depth=3, path=scan_root)` -- measure chain depth for flat orchestration check from a concrete service symbol.\n- Empty `trace_paths` from a coarse or module-level selector is not enough to clear a layer; fall back to `inspect_symbol` or grep\u002Fmanual review when the selector is broad.\n- Fall back to grep-based detection below if graph unavailable.\n### Phase 2: Detect Layer Violations\n\n```\nscan_root = scan_path IF domain_mode == \"domain-aware\" ELSE codebase_root\n\nFOR EACH violation_type IN layer_rules.md I\u002FO Pattern Boundary Rules:\n  grep_pattern = violation_type.detection_grep\n  forbidden_dirs = violation_type.forbidden_in\n\n  matches = Grep(grep_pattern, scan_root, include=\"*.py,*.ts,*.js\")\n\n  FOR EACH match IN matches:\n    IF match.path NOT IN skip_violations:\n      IF any(forbidden IN match.path FOR forbidden IN forbidden_dirs):\n        violations.append({\n          type: \"layer_violation\",\n          severity: \"HIGH\",\n          pattern: violation_type.name,\n          file: match.path,\n          line: match.line,\n          code: match.context,\n          allowed_in: violation_type.allowed_in,\n          suggestion: f\"Move to {violation_type.allowed_in}\"\n        })\n```\n\n### Phase 3: Cross-Layer Consistency Checks\n\n#### 3.1 Transaction Boundary Violations\n\n**What:** commit()\u002Frollback() called at inconsistent layers (repo + service + API)\n\n**Detection:**\n```\nrepo_commits = Grep(\"\\.commit\\(\\)|\\.rollback\\(\\)\", \"**\u002Frepositories\u002F**\u002F*.py\")\nservice_commits = Grep(\"\\.commit\\(\\)|\\.rollback\\(\\)\", \"**\u002Fservices\u002F**\u002F*.py\")\napi_commits = Grep(\"\\.commit\\(\\)|\\.rollback\\(\\)\", \"**\u002Fapi\u002F**\u002F*.py\")\n\nlayers_with_commits = count([repo_commits, service_commits, api_commits].filter(len > 0))\n```\n\n**Safe Patterns (ignore):**\n- Comment \"# best-effort telemetry\" in same context\n- File ends with `_callbacks.py` (progress notifiers)\n- Explicit `# UoW boundary` comment\n\n**Violation Rules:**\n\n| Condition | Severity | Issue |\n|-----------|----------|-------|\n| layers_with_commits >= 3 | CRITICAL | Mixed UoW ownership across all layers |\n| repo + api commits | HIGH | Transaction control bypasses service layer |\n| repo + service commits | HIGH | Ambiguous UoW owner (repo vs service) |\n| service + api commits | MEDIUM | Transaction control spans service + API |\n\n**Exception:** Saga pattern \u002F distributed transactions with explicit compensating actions -> downgrade CRITICAL to MEDIUM. UoW boundary documented with `\u002F\u002F architecture decision` or ADR -> skip.\n\n**Recommendation:** Choose single UoW owner (service layer recommended), remove commit() from other layers\n\n**Effort:** L (requires architectural decision + refactoring)\n\n#### 3.2 Session Ownership Violations\n\n**What:** Mixed DI-injected and locally-created sessions in same call chain\n\n**Detection:**\n```\ndi_session = Grep(\"Depends\\(get_session\\)|Depends\\(get_db\\)\", \"**\u002Fapi\u002F**\u002F*.py\")\nlocal_session = Grep(\"AsyncSessionLocal\\(\\)|async_sessionmaker\", \"**\u002Fservices\u002F**\u002F*.py\")\nlocal_in_repo = Grep(\"AsyncSessionLocal\\(\\)\", \"**\u002Frepositories\u002F**\u002F*.py\")\n```\n\n**Violation Rules:**\n\n| Condition | Severity | Issue |\n|-----------|----------|-------|\n| di_session AND local_in_repo in same module | HIGH | Repo creates own session while API injects different |\n| local_session in service calling DI-based repo | MEDIUM | Session mismatch in call chain |\n\n**Recommendation:** Use DI consistently OR use local sessions consistently. Document exceptions (e.g., telemetry)\n\n**Effort:** M\n\n#### 3.3 Flat Orchestration Violations\n\n**What:** Service-layer functions calling other services that call yet other services -- deep orchestration chains.\n\n**Detection:** **MANDATORY READ:** Load `references\u002Fai_ready_architecture.md` -- map service imports, find chain depth.\n\n**Violation Rules:**\n\n| Condition | Severity | Issue |\n|-----------|----------|-------|\n| Service chain >= 3 (A->B->C->D) | HIGH | Deep orchestration |\n| Service chain = 2 (A->B->C) | MEDIUM | Consider flattening |\n\n**Recommendation:** Extract orchestrator calling all services at same level. Each service becomes a sink.\n\n**Effort:** L\n\n---\n\n### Phase 4: Check Pattern Coverage\n\n```\n# HTTP Client Coverage\nall_http_calls = Grep(\"httpx\\\\.|aiohttp\\\\.|requests\\\\.\", codebase_root)\nabstracted_calls = Grep(\"client\\\\.(get|post|put|delete)\", infrastructure_dirs)\n\nIF len(all_http_calls) > 0:\n  coverage = len(abstracted_calls) \u002F len(all_http_calls) * 100\n  IF coverage \u003C 90%:\n    violations.append({\n      type: \"low_coverage\",\n      severity: \"MEDIUM\",\n      pattern: \"HTTP Client Abstraction\",\n      coverage: coverage,\n      uncovered_files: files with direct calls outside infrastructure\n    })\n\n# Error Handling Duplication\nhttp_error_handlers = Grep(\"except\\\\s+(httpx\\\\.|aiohttp\\\\.|requests\\\\.)\", codebase_root)\nunique_files = set(f.path for f in http_error_handlers)\n\nIF len(unique_files) > 2:\n  violations.append({\n    type: \"duplication\",\n    severity: \"MEDIUM\",\n    pattern: \"HTTP Error Handling\",\n    files: list(unique_files),\n    suggestion: \"Centralize in infrastructure layer\"\n  })\n```\n\n### Phase 5: Calculate Score\n\n**MANDATORY READ:** Load `references\u002Faudit_worker_core_contract.md` and `references\u002Faudit_scoring.md`.\n\n### Phase 6: Write Report\n\n**MANDATORY READ:** Load `references\u002Ftemplates\u002Faudit_worker_report_template.md`.\n\nWrite JSON summary per `references\u002Faudit_summary_contract.md`. In managed mode the caller passes both `runId` and `summaryArtifactPath`; in standalone mode the worker generates its own run-scoped artifact path per shared contract.\n\n```\n# Build markdown report in memory with:\n# - AUDIT-META (standard penalty-based: score, counts)\n# - Checks table (io_isolation, http_abstraction, error_centralization, transaction_boundary, session_ownership)\n# - Findings table (violations sorted by severity)\n# - DATA-EXTENDED: {architecture, coverage}\n\nIF domain_mode == \"domain-aware\":\n  Write to {output_dir}\u002F642-layer-boundary-{current_domain}.md\nELSE:\n  Write to {output_dir}\u002F642-layer-boundary.md\n```\n\n### Phase 7: Return Summary\n\n```\nReport written: .hex-skills\u002Fruntime-artifacts\u002Fruns\u002F{run_id}\u002Faudit-report\u002F642-layer-boundary-users.md\nScore: 4.5\u002F10 | Issues: 8 (C:1 H:3 M:4 L:0)\n```\n\n## Critical Rules\n\nApply the already-loaded `references\u002Faudit_worker_core_contract.md`.\n\n- **Read architecture.md first** - never assume architecture type\n- **Skip violations list** - respect legacy files marked for gradual fix\n- **File + line + code** - always provide exact location with context\n- **Actionable suggestions** - always tell WHERE to move the code\n- **No false positives** - verify path contains forbidden dir, not just substring\n- **Unique angle:** Audit layer, ownership, and orchestration boundaries only. Do not audit package health, generic code quality, dependency graph topology, or runtime concurrency hazards.\n- **Action required:** Every finding uses `MOVE_BOUNDARY`, `CHOOSE_OWNER`, or `FLATTEN_ORCHESTRATION`.\n\n## Definition of Done\n\nApply the already-loaded `references\u002Faudit_worker_core_contract.md`.\n\n- [ ] Architecture discovered from docs\u002Farchitecture.md (or fallback used)\n- [ ] All violation types from layer_rules.md checked\n- [ ] **Cross-layer consistency checked:**\n  - Transaction boundaries analyzed (commit\u002Frollback distribution)\n  - Session ownership analyzed (DI vs local)\n- [ ] Coverage calculated for HTTP abstraction + 2 consistency metrics\n- [ ] Violations list with severity, location, suggestion\n- [ ] If domain-aware: all Grep scoped to scan_path, findings tagged with domain\n- [ ] Report written to `{output_dir}\u002F642-layer-boundary[-{domain}].md` (atomic single Write call)\n- [ ] Summary written per contract\n\n## Reference Files\n\n- Layer rules: `references\u002Flayer_rules.md`\n- Scoring impact: use `references\u002Faudit_scoring.md`\n\n---\n\n**Version:** 2.1.0\n**Last Updated:** 2026-02-08\n",{"name":5,"license":15,"description":7,"allowed-tools":49},"Read, Grep, Glob, Bash, mcp__hex-graph__find_references, mcp__hex-graph__trace_paths, mcp__hex-graph__inspect_symbol, mcp__hex-graph__analyze_architecture, mcp__hex-line__read_file, mcp__hex-line__grep_search, mcp__hex-line__outline","main","fbfb242f793fdf040f3a1a6b100896c188c228c8","_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor",1,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog","https:\u002F\u002Fgithub.com\u002Fvitalikpestov","Listing on crypto exchanges","2026-06-15 22:12:56",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add vitalikpestov\u002FSkills-Catalog --skill ln-642-layer-ownership-boundary-auditor",{"tool":64,"command":65},"bunx","bunx skills add vitalikpestov\u002FSkills-Catalog --skill ln-642-layer-ownership-boundary-auditor",{"tool":67,"command":68},"pnpm","pnpm dlx skills add vitalikpestov\u002FSkills-Catalog --skill ln-642-layer-ownership-boundary-auditor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002FSKILL.md",true,[72,78,82,86,90,94,98,102,106],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fai_ready_architecture.md","REFERENCE","参考文档",7210,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Fai_ready_architecture.md",{"path":79,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Faudit_scoring.md",1117,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Faudit_scoring.md",{"path":83,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Faudit_summary_contract.md",2206,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Faudit_summary_contract.md",{"path":87,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Faudit_worker_core_contract.md",1851,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Faudit_worker_core_contract.md",{"path":91,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Flayer_rules.md",4036,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Flayer_rules.md",{"path":95,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fmcp_integration_patterns.md",1567,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Fmcp_integration_patterns.md",{"path":99,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fmcp_tool_preferences.md",2338,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Fmcp_tool_preferences.md",{"path":103,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Ftemplates\u002Faudit_worker_report_template.md",1686,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Ftemplates\u002Faudit_worker_report_template.md",{"path":107,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Ftwo_layer_detection.md",1504,"https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_AI-Automation\u002Fclaude-code-skills-levnikolaevich\u002Fplugins\u002Fcodebase-audit-suite\u002Fskills\u002Fln-642-layer-ownership-boundary-auditor\u002Freferences\u002Ftwo_layer_detection.md",[111,149,173,189,212,245],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":129,"publishedAt":148},"01M71V1MC994P553631JZSWVYD","solana-dev","Use when user asks to \"build a Solana dapp\", \"write an Anchor program\", \"create a token\", \"debug Solana errors\", \"set up wallet connection\", \"test my Solana program\", \"deploy to devnet\", or \"explain Solana concepts\" (rent, accounts, PDAs, CPIs, etc.). End-to-end Solana development playbook covering wallet connection, Anchor\u002FPinocchio programs, Codama client generation, LiteSVM\u002FMollusk\u002FSurfpool testing, and security checklists. Integrates with the Solana MCP server for live documentation search. Prefers framework-kit (@solana\u002Fclient + @solana\u002Freact-hooks) for UI, wallet-standard-first connection (incl. ConnectorKit), @solana\u002Fkit for client\u002FRPC code, and @solana\u002Fweb3-compat for legacy boundaries.","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Web3\u002Fsolana-dev\u002Fskill\u002FSKILL.md",[117,120,123,124],{"categoryNo":118,"categoryName":119,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":125,"categoryName":126,"taxonomyType":127,"taxonomyTypeDesc":128},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[130,131,132,133,42,134,135,136,40,137,138,139,140,141,142,143,144,145,146,147],"dev","solana dev","solana","Wallet","testing","solana cli","kit","web3","react","create","server","write","playbook","live","security","ui","concepts","toolchain","2026-11-10 13:02:02",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":148},"01M71TYQPHE2YGKTT7DG9QCW3K","generating-trading-signals","Generate trading signals using technical indicators (RSI, MACD, Bollinger Bands, etc.).\nCombines multiple indicators into composite signals with confidence scores.\nUse when analyzing assets for trading opportunities or checking technical indicators.\nTrigger with phrases like \"get trading signals\", \"check indicators\", \"analyze for entry\",\n\"scan for opportunities\", \"generate buy\u002Fsell signals\", or \"technical analysis\".","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Trading-Finance\u002Fgenerating-trading-signals\u002FSKILL.md",[],[156,157,158,159,160,161,162,163,164,165,166,167,168,38,37,169,170,171,172,35],"generating trading signals","signals","trading signals","trading","get","technical indicators","for","scan","rsi","trigger","python","technical","use","analysis","code","io","check",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":148},"01M71TY4CR3GKGQ3M12X9WN95Y","prediction-monitor","Prediction Monitor - Auto-activating skill for ML Deployment.\nTriggers on: prediction monitor, prediction monitor\nPart of the ML Deployment skill category.","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Trading-Finance\u002FAI Predictions\u002Fprediction-monitor\u002FSKILL.md",[],[180,181,182,162,183,32,141,184,185,186,187,188,37],"prediction","monitor","prediction monitor","deployment","edit","triggers","grep","auto","ml",{"skillNo":190,"name":191,"nameZh":6,"description":192,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":193,"categories":194,"keywords":195,"publishedAt":148},"01M71TXD9MYXZC39HCPP909HTZ","strategy-advisor","High-level strategic thinking and business decision guidance for planning and direction-setting.\nUse when: making strategic decisions, evaluating business options, setting direction, analyzing\ntrade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Product-Apps\u002Fstrategy-advisor\u002FSKILL.md",[],[196,197,198,199,200,201,202,203,204,162,205,206,207,168,208,209,38,210,169,211],"strategy advisor","strategy","advisor","competitive","setting","thinking","planning","direction","trade-offs","long","decision","strategic","business","apps","decisions","trade",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":216,"sourceHtmlUrl":217,"categories":218,"keywords":225,"publishedAt":148},"01M71TWHBT2R1P1FNWTW67ZREP","app-paywall-pilot","Design, audit, debug, and implement App Store-compliant mobile paywalls, subscription flows, pricing screens, trials, offers, feature gates, and subscription lifecycle UX. Use when the user asks to audit my paywall, fix App Store 3.1.2 rejection, improve trial-to-paid, choose plans\u002Fprices\u002Ftrials, review RevenueCat\u002FAdapty\u002FApphud\u002FSuperwall setup, calculate LTV\u002FROAS, or build paywall implementation.","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Product-Apps\u002Ffrom-dosesync\u002Fapp-paywall-pilot\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Product-Apps\u002Ffrom-dosesync\u002Fapp-paywall-pilot\u002FSKILL.md",[219,222],{"categoryNo":220,"categoryName":221,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":223,"categoryName":224,"taxonomyType":127,"taxonomyTypeDesc":128},"01JBSEEDCAT000000000000032","设计师",[226,227,228,229,230,231,232,233,234,235,236,237,38,238,239,240,241,242,243,244],"app","paywall","app paywall pilot","paid","paywalls","prices","choose","flows","fix","improve","design","app store","review","audit","ux","subscription","mobile","my","calculate",{"skillNo":246,"name":247,"nameZh":6,"description":248,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":249,"licenseFileUrl":250,"sourceHtmlUrl":251,"categories":252,"keywords":255,"publishedAt":148},"01M71TWET8GFKEB7ZHJPMQX29V","figma","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Product-Apps\u002Ffigma\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fvitalikpestov\u002FSkills-Catalog\u002Fblob\u002Fmain\u002F_Product-Apps\u002Ffigma\u002FSKILL.md",[253,254],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":223,"categoryName":224,"taxonomyType":127,"taxonomyTypeDesc":128},[247,256,257,258,259,165,236,40,168,38,260,261,170,262,140,263,264,265,266,267],"fetch","ids","mcp setup","translate","mcp server","Variables","task","Nodes","figma mcp","code implementation","node","assets"]