AGENT SKILL

gitnexus-area-rules-2

Skill for the _rules area of slopgate. 79 symbols across 31 files.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 1
Forks
0

01 前言 Front Matter

name
gitnexus-area-rules-2
description
Skill for the _rules area of slopgate. 79 symbols across 31 files.

03 SKILL.md 正文

_rules

79 symbols | 31 files | Cohesion: 65%

When to Use

  • Working with code in src/
  • Understanding how is_rule_enabled, read_context_fragment, evaluate_common work
  • Modifying _rules-related functionality

Key Files

File Symbols
src/slopgate/rules/python_ast/_rules/source_parse.py first_significant_line, is_full_module_candidate, line_count, looks_like_indented_fragment, parse_health_failure (+5)
src/slopgate/rules/python_ast/_rules/complexity_dead.py evaluate, evaluate, _check_source, _complexity, _check_source (+3)
src/slopgate/rules/python_ast/_rules/broad_silent.py evaluate, evaluate, is_broad_exception, is_empty_default_return, is_logger_call (+2)
src/slopgate/rules/python_ast/_rules/ast_health.py _evaluate_post, _evaluate_pre, _post_path_failure, _pre_content_failure, _recovery_text (+2)
src/slopgate/rules/python_ast/_rules/feature_envy.py evaluate, _check_function, _check_source, _count_envy_accesses, _param_names (+1)
src/slopgate/rules/python_ast/_rules/private_imports.py evaluate, _check_source, _path_finding, finding
src/slopgate/rules/python_ast/_staging/test_smell_rules.py evaluate, evaluate, evaluate, evaluate
src/slopgate/rules/python_ast/_rules/style_limits/nesting.py evaluate, _check_source, _max_nesting
src/slopgate/rules/python_ast/_rules/class_shape/god.py _check_source, _non_dunder_method_count, evaluate
src/slopgate/rules/common/_shell_read.py read_context_fragment, evaluate

Entry Points

Start here when exploring this area:

  • is_rule_enabled (Function) — src/slopgate/rules/base.py:29
  • read_context_fragment (Function) — src/slopgate/rules/common/_shell_read.py:69
  • evaluate_common (Function) — src/slopgate/rules/python_ast/_helpers.py:93
  • is_security_doc_or_example (Function) — src/slopgate/rules/stop_rules/_infra_security.py:134
  • collect_git_context (Function) — src/slopgate/rules/stop_rules/_session_config.py:22

Key Symbols

Symbol Type File Line
is_rule_enabled Function src/slopgate/rules/base.py 29
read_context_fragment Function src/slopgate/rules/common/_shell_read.py 69
evaluate_common Function src/slopgate/rules/python_ast/_helpers.py 93
is_security_doc_or_example Function src/slopgate/rules/stop_rules/_infra_security.py 134
collect_git_context Function src/slopgate/rules/stop_rules/_session_config.py 22
is_line_count_camouflage Function src/slopgate/rules/python_ast/_rules/module/size/sources.py 30
first_significant_line Function src/slopgate/rules/python_ast/_rules/source_parse.py 27
is_full_module_candidate Function src/slopgate/rules/python_ast/_rules/source_parse.py 64
line_count Function src/slopgate/rules/python_ast/_rules/source_parse.py 104
looks_like_indented_fragment Function src/slopgate/rules/python_ast/_rules/source_parse.py 36
parse_health_failure Function src/slopgate/rules/python_ast/_rules/source_parse.py 44
resolve_python_path Function src/slopgate/rules/python_ast/_rules/source_parse.py 96
test_ast_health_rule_reports_invalid_python_content Function tests/integration/test_python_ast_rule_public_api.py 300
parsed_classes Function src/slopgate/rules/python_ast/_rules/source_parse.py 125
parsed_nodes Function src/slopgate/rules/python_ast/_rules/source_parse.py 109
python_ast_rule_is_disabled Function src/slopgate/rules/python_ast/_rules/source_parse.py 131
test_god_class_rule_reports_structural_smell Function tests/integration/test_python_ast_rule_public_api.py 236
is_broad_exception Function src/slopgate/rules/python_ast/_rules/broad_silent.py 25
is_empty_default_return Function src/slopgate/rules/python_ast/_rules/broad_silent.py 49
is_logger_call Function src/slopgate/rules/python_ast/_rules/broad_silent.py 39

Execution Flows

Flow Type Steps
Pre_python_camouflage_sources → Resolve_python_path cross_community 5
Evaluate → Is_rule_enabled cross_community 3
Flat_sibling_projected_removed_files → First_present cross_community 3

How to Explore

  1. context({name: "is_rule_enabled"}) — see callers and callees
  2. query({search_query: "_rules"}) — find related execution flows
  3. Read key files listed above for implementation details
  4. explain({target: "<file or symbol>"}) — persisted taint findings (source→sink data flows), when indexed with --pdg

04 同仓库更多 Skills

vasceannie
vasceannie/slopgate

type-strictness

Enforce strict type compliance by eliminating `Any` types and `# type: ignore` comments. Use when: (1) Editing code that contains `Any` as a type annotation (2) Code has `# type: ignore` or `# pyright: ignore` comments (3) User requests type fixes or type strictness enforcement (4) Importing from untyped third-party libraries (5) User asks to "fix types", "remove Any", or "add proper typing" (6) Pyrefly or mypy reports type errors that need resolution (7) Code review reveals weak typing patterns Follows hierarchical resolution: codebase inference → type stubs → library inspection → type guards → casting (last resort).

代码审查
★ 1
vasceannie
vasceannie/slopgate

slopgate-test-extender

Extend Python test suites with parametrization, fixture reuse, and quality enforcement. Use when asked to add tests, extend existing tests, improve test coverage, consolidate duplicate tests, fix test quality issues, or when Slopgate reports untested-production-code, missing test references, or coverage gaps. Triggers on requests like "add tests for X", "extend these tests", "parametrize tests", "consolidate tests", "fix test quality", "improve test coverage", "write tests for this function", "test this module", "behavior tests", "integration tests", "missing tests", "coverage holes", "untested code", or when a hook denies with test-related findings.

代码审查测试与质量
★ 1
vasceannie
vasceannie/slopgate

slopgate-intelligent-coding-patterns

Pattern-selection playbook for agents editing code with complex branching, stateful parsers/workflows, duplicated skeletons, policy checks, or ordered transforms. Load before refactoring if/elif dispatch chains, boolean-flag state machines, repeated validation predicates, parallel provider/language implementations, or regex/content transformation pipelines. Also load when asked to "apply a design pattern", "which pattern should I use here", "refactor this switch statement", "replace if-elif chain", "state machine pattern", "strategy pattern", "template method", "pipeline pattern", "specification pattern", "dispatch table", "guard clause refactor", "reduce cyclomatic complexity", or when Slopgate fires PY-CODE-014, PY-CODE-017, PY-CODE-018, QUALITY-LINT-001, or PY-QUALITY-010. Use with behavior-locking tests and avoid pattern theater for simple one-off code.

开发工程师设计师代码审查视觉设计
★ 1
vasceannie
vasceannie/slopgate

slopgate-hygiene-orchestrator

Orchestrate systematic elimination of linter warnings and errors across Python, TypeScript, and Rust codebases. Use when asked to "clean up lints", "fix all warnings", "run hygiene", "eliminate type errors", "orchestrate code quality fixes", "fix lint errors", "resolve quality gate failures", "pass CI checks", "reduce tech debt", "refactor to pass hooks", or when a Slopgate hook denies with QUALITY-LINT-001, PY-CODE-017, PY-CODE-018, or any collector finding. This skill coordinates multiple code-hygiene-enforcer agents working in parallel on non-conflicting file groupings, tracks progress persistently via JSON exports, and loops until all issues are resolved. CRITICAL: Never run linters directly—always use `slopgate lint check` as the primary gate, discover project-specific tools from config files, and export findings to JSON for tracking.

代码审查Skill与智能体开发
★ 1
vasceannie
vasceannie/slopgate

slopgate-code-smell-utility-locator

Autoactivate when code-smell hooks or reviews mention feature envy, thin wrappers, duplicate helpers, duplicate code, scattered helpers, builders/factories/config/constants/dataclass reuse, PY-CODE-012, PY-CODE-013, QUALITY-LINT-001, or repeated slopgate code-quality denials. Also load when asked to "find existing helpers", "consolidate utilities", "search for duplicate code", "where is this already implemented", "reuse existing logic", "don't duplicate this", "find similar functions", "utility inventory", "code smell radar", or before adding new helpers/wrappers so agents can find existing shared utilities and consolidate instead of duplicating.

开发工程师代码审查
★ 1
vasceannie
vasceannie/slopgate

slopgate-code-hygiene-refactor

Recovery playbook for Slopgate and project quality failures. Load after hook/lint denials such as PY-CODE-017 flat sibling modules, PY-CODE-018 oversized modules, QUALITY-LINT-001 post-edit quality backstops, PY-QUALITY-010 magic numbers / repeated literals, PY-CODE-012/PY-CODE-013 smell findings, type-suppression bans, duplicate helpers, or repeated hygiene retry loops. Also load when asked to "refactor this module", "split this file", "extract a class", "reduce complexity", "fix god class", "flatten module hierarchy", "move code to a package", "extract helpers", "consolidate duplicates", "replace magic numbers with constants", or when a hook blocks an edit with structural complaints. Focuses on preserving public APIs while refactoring toward packages, cohesive modules, typed seams, and focused tests.

开发工程师代码审查
★ 1