guard-src-drift
Skill14 starsChanged 7 months agoMITView on GitHub
Drift-generierter Guard fuer `src/drift`. Aktiv bei Signalen: AVS, EDS, MDS, PFS. Konfidenz: 0.95. Verwende diesen Skill wenn du Aenderungen an `src/drift` planst oder wiederholte Drift-Findings (AVS, EDS, MDS, PFS) fuer dieses Modul bearbeitest.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- brainstormingSkill
- drift-adr-workflowSkill
- drift-agent-prompt-authoringSkill
- drift-commit-pushSkill
- drift-dependency-updateSkill
- drift-docs-gap-fixSkill
- drift-evidence-artifact-authoringSkill
- drift-finding-message-authoringSkill
- drift-ground-truth-fixture-developmentSkill
- drift-mcp-repo-ops-usageSkill
- drift-pr-review-loopSkill
- drift-pr-reviewSkill
- drift-releaseSkill
- drift-risk-audit-artifact-updatesSkill
- drift-security-triageSkill
- drift-session-handover-authoringSkill
- drift-signal-development-full-lifecycleSkill
- fix-failing-actionsSkill
- grill-meSkill
- guard-src-drift-apiSkill
- guard-src-drift-commandsSkill
- guard-src-drift-ingestionSkill
- guard-src-drift-outputSkill
- guard-src-drift-signalsSkill
- improve-codebase-architectureSkill
- prd-to-issuesSkill
- self-improving-agentSkill
- simplify-and-hardenSkill
- skill-creatorSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tddSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- workspace-automation-orchestratorSkill
- write-a-prdSkill
- writing-plansSkill
The file
Files
Guard: src/drift
src/drift ist der Kern des gesamten Analyzers. Er enthaelt analyzer.py, pipeline.py, cache.py, scoring/, mcp_*.py-Orchestrierung und alle oeffentlichen Einstiegspunkte. Jede Aenderung hier hat breite Auswirkungen auf Scan-Korrektheit, Scoring und Agenten-Verhalten.
Konfidenz: 0.95 — alle vier Hauptsignale treten wiederholt auf.
When To Use
- Du aenderst eine Datei direkt in
src/drift/(nicht in einem Unterpaket) - Du bearbeitest
analyzer.py,pipeline.py,cache.py,api_helpers.py,task_graph.pyoderscoring/ - Ein Drift-Scan meldet AVS, EDS, MDS oder PFS fuer Dateien im Wurzelpaket
- Vor einem Commit der
src/drift/__init__.pyoder oeffentliche Exports aendert
Nicht benutzen fuer Aenderungen ausschliesslich in src/drift/signals/, src/drift/api/ oder src/drift/output/ — dafuer gibt es dedizierte Guards.
Warum dieses Modul kritisch ist
src/drift/ ist das einzige Modul mit allen vier Hochrisiko-Signalen gleichzeitig:
| Signal | Was es bedeutet | Konkretes Risiko hier |
| AVS | God-Module / Abstraction Violation | analyzer.py baut Verantwortlichkeiten auf — neue Logik dort zieht AVS an |
| EDS | Unexplained Complexity | drift_map, pipeline.py haben bereits EDS — neue verschraenkte Logik verschlimmert das |
| MDS | Exakte Duplikate | Hilfsfunktionen entstehen oft doppelt wenn man nicht _utils.py oder api_helpers.py nutzt |
| PFS | Pattern Fragmentation | MCP-Handler (mcp_*.py) haben schon inkonsistente Muster — neue Varianten erhoehen PFS |
Core Rules
- Keine neue Logik direkt in
analyzer.pyoderpipeline.py— diese Dateien sind bereits God-Module-Kandidaten (AVS). Neue Faehigkeiten gehoeren in dedizierte Untermodule oder Klassen. - Duplikate aktiv vermeiden — vor dem Schreiben einer neuen Hilfsfunktion
grep_searchin_utils.py,api_helpers.py,scoring/undtask_graph.pylaufen lassen. MDS entsteht fast immer dadurch, dass eine existierende Funktion nicht gefunden wurde. - MCP-Handler konsistent halten —
mcp_router_*.py-Dateien folgen demselben Muster. Neue Handler muessen dasselbe Routing-Interface implementieren, sonst steigt PFS. cache.pynicht fuer neue Concerns erweitern —cache.pyhat bereits hohe DCA (unused exports). Neue Cache-Logik kommt als separate Klasse, nicht als weitere Methode inBaselineManager.- Oeffentliche API-Exports explizit halten — was in
__init__.pylandet, ist Vertrag. Kein implizites Re-Export von internen Symbolen.
Arbeitsablauf vor einem Commit
# 1. Scan auf Ziel-Scope
drift analyze --repo . --format rich --exit-zero
# 2. Schnelle Richtungspruefung nach Aenderung
drift nudge # erwartet: safe_to_commit: true
# 3. Keine neuen AVS/EDS/MDS/PFS einfuehren
# Vergleiche Finding-Count vorher vs. nachherReview Checklist
- Neue Logik geht in ein Unterpaket, nicht in
analyzer.pyoderpipeline.py - Vor neuer Hilfsfunktion: Duplikat-Check in
_utils.py,api_helpers.py,scoring/ - MCP-Handler folgt dem bestehenden
mcp_router_*.py-Muster drift nudgezeigtsafe_to_commit: true__init__.py-Exports sind bewusste, dokumentierte Entscheidungen- Keine neuen AVS/EDS/MDS/PFS-Findings im Diff
References
- DEVELOPER.md
- src/drift/pipeline.py — Analyse-Pipeline
- src/drift/analyzer.py — Haupt-Analyzer
- src/drift/api_helpers.py — Gemeinsame Hilfsfunktionen
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

