guard-src-drift-ingestion
Skill14 starsChanged 7 months agoMITView on GitHub
Drift-generierter Guard fuer `src/drift/ingestion`. Aktiv bei Signalen: AVS, EDS, PFS. Konfidenz: 0.95. Verwende diesen Skill wenn du Aenderungen an `src/drift/ingestion` planst oder wiederholte Drift-Findings (AVS, EDS, 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-outputSkill
- guard-src-drift-signalsSkill
- guard-src-driftSkill
- 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/ingestion
src/drift/ingestion ist die Datenerfassungsschicht: file_discovery.py findet Dateien, ast_parser.py und ts_parser.py parsen Code, git_history.py und git_blame.py lesen Commit-Historie, external_report.py importiert SARIF/externe Reports. Jede Datei hat eine klar abgegrenzte Aufgabe — AVS, EDS und PFS entstehen wenn diese Grenzen verschwimmen.
Konfidenz: 0.95 — Ingestion-Fehler propagieren still und erzeugen falsche Negatives in jedem Signal.
When To Use
- Du aenderst wie Dateien gefunden, gefiltert oder gelesen werden (
file_discovery.py) - Du erweiterst den AST-Parser fuer neue Python-Konstrukte oder Tree-sitter-Nodes
- Du veraenderst wie Git-Commits oder Blame-Daten eingelesen werden
- Du fuegest Unterstuetzung fuer ein neues Sprachformat hinzu
- Drift meldet AVS, EDS oder PFS fuer Dateien in
src/drift/ingestion/
Warum dieses Modul kritisch ist
| Signal | Ursache in ingestion/ |
| AVS | ast_parser.py zaehlt Aufgaben: parsen + normalisieren + Metadaten extrahieren + Fehlerbehandlung — zu viele Verantwortlichkeiten |
| EDS | Git-Commit-Logik und AST-Traversierung teilen sich Zustand oder Helper — erzeugt unverstaendliche Kopplung |
| PFS | Python-Parsing und TypeScript-Parsing haben unterschiedliche Fehlerbehandlungs- und Rueckgabemuster |
Core Rules
- Strikte Trennung der Ingestion-Stufen — Datei-Entdeckung (
file_discovery.py) darf NICHT parsen. Parser duerfen NICHT Git-History lesen. Jede Ingestion-Stufe erhaelt ihre Daten als Parameter, nicht durch direkten Aufruf einer anderen Stufe. ParseResultist das einzige Ausgabeformat der Parser —ast_parser.pyundts_parser.pygeben ausschliesslichParseResult-Objekte zurueck. Kein direktes Schreiben in Dictionaries oder nakedObjects.- Fehler in Parsern sind
ParseResultmiterror-Status — nieraiseohne Wrapper in Parsern. Ein fehlerhafter Parse erzeugt einParseResult(status='error', ...), kein unbehandeltes Exception. FileHistorybleibt dekoriert, nicht berechnet —git_history.pyliest Rohcommits und gibtFileHistoryzurueck. Keine Berechnungen (Volatility-Score, Hotness) ingit_history.py— das ist Aufgabe von Signals.- Include/Exclude-Logik gehoert ausschliesslich in
file_discovery.py— kein Signal und kein API-Handler darf Dateipfade selbst filtern. PFS entsteht wenn mehrere Stellen eigene Include-Logik haben.
Iron Law
Kein neues Dateiformat ohne Test in
tests/test_file_discovery.py. Stummes Ueberspringen von.pyi,.mjs,.mts-Dateien war bereits eine Regression — reproducierbare Tests verhindern das.
Review Checklist
- Neue Parser-Logik gibt
ParseResultzurueck, kein Dict oder tuple - Fehlerfall in Parsern:
ParseResult(status='error'), keinraise file_discovery.pyist einzige Stelle fuer Include/Exclude-Logik- Git-History-Funktionen berechnen keine Scores (nur rohe
FileHistory) - Tests in
tests/test_file_discovery.pyabgedeckt drift nudgezeigtsafe_to_commit: true- Keine neuen AVS/EDS/PFS-Findings
References
- src/drift/ingestion/file_discovery.py — Discovery-Pipeline
- src/drift/ingestion/ast_parser.py — Python-AST-Parser
- src/drift/ingestion/git_history.py — Git-History-Reader
- tests/test_file_discovery.py — Discovery-Tests
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.

