guard-src-drift-commands
Skill14 starsChanged 7 months agoMITView on GitHub
Drift-generierter Guard fuer `src/drift/commands`. Aktiv bei Signalen: EDS, PFS. Konfidenz: 0.89. Verwende diesen Skill wenn du Aenderungen an `src/drift/commands` planst oder wiederholte Drift-Findings (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-ingestionSkill
- 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/commands
src/drift/commands enthaelt die CLI-Command-Handler. Jeder Subbefehl (analyze, verify, serve, calibrate, ...) hat eine eigene Datei. EDS entsteht wenn Commands direkt in pipeline.py oder Analyzer() einsteigen. PFS entsteht wenn Commands inkonsistente Argument-Parsing- oder Output-Handling-Muster verwenden.
Konfidenz: 0.89 — EDS und PFS treten regelmaessig auf, oft nach Features die Shortcuts einbauen.
When To Use
- Du fuegest einen neuen CLI-Subbefehl hinzu
- Du aenderst wie ein bestehender Befehl Argumente verarbeitet oder Ergebnisse ausgibt
- Du aenderst wie Exit-Codes gesetzt werden
- Drift meldet EDS oder PFS fuer eine Datei in
src/drift/commands/
Nicht benutzen fuer Aenderungen an der CLI-Definition in cli.py — das ist ein anderer Scope.
Warum dieses Modul kritisch ist
| Signal | Ursache in commands/ |
| EDS | Command-Handler die direkt pipeline.run(), Analyzer() oder scoring/-Module aufrufen — Command sollte ausschliesslich die entsprechende api/-Funktion aufrufen |
| PFS | Inkonsistente Exit-Code-Logik: manche Commands nutzen sys.exit(1), andere raise SystemExit, andere geben 1 zurueck |
Core Rules
- Commands delegieren an
api/— ein Command-Handler tut folgendes: Argumente lesen →api.function(...)aufrufen → Ergebnis mitoutput/rendern → Exit-Code setzen. Kein direkter Aufruf vonpipeline.pyoderAnalyzer(). - Konsistente Exit-Code-Konvention —
0= Erfolg,1= Findings ueber Threshold,2= Konfigurationsfehler,3= interne Fehler. Kein eigenes Exit-Code-Schema in einem neuen Command. - Output-Formatierung nicht im Command-Handler — der Command-Handler uebergibt das Ergebnis an einen Formatter aus
output/. Keinprint(json.dumps(...))direkt im Command. --format-Flag konsistent — alle Commands die Ausgabe erzeugen, unterstuetzen dasselbe--format-Flag mit denselben Werten (rich,json,markdown). PFS steigt wenn ein neuer Command andere Werte einfuehrt.- Fehlerbehandlung uniform — Commands fangen
DriftErrorund schreiben in stderr, nicht stdout. Ein neuer Command der Fehler in stdout schreibt bricht tooling-pipelines.
Review Checklist
- Command ruft
api.function()auf, nichtpipeline.pydirekt - Exit-Code folgt der 0/1/2/3-Konvention
- Output geht durch Formatter aus
output/, kein direktesprint --format-Flag hat dieselben Werte wie andere Commands- Fehler gehen nach stderr, nicht stdout
drift nudgezeigtsafe_to_commit: true- Keine neuen EDS/PFS-Findings in
src/drift/commands/
References
- src/drift/cli.py — CLI-Einstiegspunkt und Command-Registrierung
- src/drift/api/ — Alle aufrufbaren API-Funktionen
- src/drift/output/ — Output-Formatter
- DEVELOPER.md
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.

