AGENT SKILL

gitnexus-area-project-index

Skill for the Project_index area of slopgate. 126 symbols across 30 files.

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

01 前言 Front Matter

name
gitnexus-area-project-index
description
Skill for the Project_index area of slopgate. 126 symbols across 30 files.

03 SKILL.md 正文

Project_index

126 symbols | 30 files | Cohesion: 74%

When to Use

  • Working with code in src/
  • Understanding how build_analysis_index, build_project_index, facts_to_json work
  • Modifying project_index-related functionality

Key Files

File Symbols
src/slopgate/lint/project_index/facts.py facts_to_json, _count, _mapping_rows, _pair_tuple, _text (+9)
src/slopgate/lint/project_index/store.py upsert_file, connect_index, index_db_path, is_file_local_ready, load_file_rows (+9)
src/slopgate/lint/project_index/summarize.py _common_parent, attempt_lookup, index_root, sorted_project_paths, summary_payload_size (+8)
src/slopgate/lint/project_index/integrity_store.py _payload_from_index, index_content_signature, load_integrity_index, load_or_build_integrity_index, save_integrity_index (+5)
src/slopgate/lint/project_index/constant_cache.py _file_signature, _payload_json, load_constant_index, save_constant_index, _constants_from_payload (+3)
src/slopgate/lint/project_index/integrity_facts.py _call_sites_from_index, _deprecated_for_refs, _deprecated_hits, _source_modules, _symbols_from_index (+3)
src/slopgate/lint/_collector_groups/source_prepare.py build_analysis_index, _constant_index_reusable, _session_constant_index, maybe_literals, _hits_from_facts
src/slopgate/lint/project_index/peek.py peek_index, _row_content_matches, _row_current, _row_stat_matches, _stat_mismatched
src/slopgate/lint/project_index/extract.py _block_windows, _call_sequences, _numeric_literals, _textual_literals, extract_file_facts
src/slopgate/lint/project_index/fingerprint.py _canonical_config_value, _config_payload, _detector_tree_stamp, engine_fingerprint

Entry Points

Start here when exploring this area:

  • build_analysis_index (Function) — src/slopgate/lint/_collector_groups/source_prepare.py:212
  • build_project_index (Function) — src/slopgate/lint/project_index/build.py:19
  • facts_to_json (Function) — src/slopgate/lint/project_index/facts.py:181
  • build_persisted_index (Function) — src/slopgate/lint/project_index/persist.py:19
  • upsert_file (Function) — src/slopgate/lint/project_index/store.py:130

Key Symbols

Symbol Type File Line
build_analysis_index Function src/slopgate/lint/_collector_groups/source_prepare.py 212
build_project_index Function src/slopgate/lint/project_index/build.py 19
facts_to_json Function src/slopgate/lint/project_index/facts.py 181
build_persisted_index Function src/slopgate/lint/project_index/persist.py 19
upsert_file Function src/slopgate/lint/project_index/store.py 130
attempt_lookup Function src/slopgate/lint/project_index/summarize.py 47
index_root Function src/slopgate/lint/project_index/summarize.py 35
sorted_project_paths Function src/slopgate/lint/project_index/summarize.py 23
summary_payload_size Function src/slopgate/lint/project_index/summarize.py 69
test_lint_parse_pipeline_integrity_signature_empty_index Function tests/integration/test_lint_parse_pipeline.py 110
cold_index_context Function tests/test_lint_incremental_restrict_violations.py 14
test_restrict_violations_passthrough_when_cache_cold Function tests/test_lint_incremental_restrict_violations.py 43
empty_index Function tests/test_lint_integrity_facts_api.py 26
test_integrity_index_from_empty_project Function tests/test_lint_integrity_facts_api.py 47
test_stale_reference_violations_empty Function tests/test_lint_integrity_facts_api.py 51
test_integrity_index_roundtrip_empty_modules Function tests/test_lint_integrity_store_api.py 31
incremental_context Function src/slopgate/lint/_collector_groups/incremental.py 22
apply_index_peek Function src/slopgate/lint/_collector_groups/planner.py 132
peek_index Function src/slopgate/lint/project_index/peek.py 25
connect_index Function src/slopgate/lint/project_index/store.py 78

Execution Flows

Flow Type Steps
Source_analysis → Project_root cross_community 10
Source_analysis → Load_config cross_community 10
Scan_git_base_debt → Object_dict cross_community 10
Peek_index → Object_dict cross_community 10
Source_analysis → Get_quality_scope cross_community 9
Extract_file_facts → Object_dict cross_community 9
Scan_git_base_debt → _coerce_path_entries cross_community 8
Scan_git_base_debt → _resolve_path_entries cross_community 8
Peek_index → _coerce_path_entries cross_community 8
Peek_index → _resolve_path_entries cross_community 8

How to Explore

  1. context({name: "build_analysis_index"}) — see callers and callees
  2. query({search_query: "project_index"}) — 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