drift-signal-development-full-lifecycle
Skill14 starsChanged 7 months agoMITView on GitHub
Use this skill for non-trivial signal work from decision through validation. Use the gate format from .github/instructions/drift-policy.instructions.md before doing design or implementation work. Before coding: If a calibration materially changes signal behavior, scoring implications, or reviewer trust expectations, treat it as ADR-worthy even when it is framed as precision/recall hardening. The design should already state: New signal code belongs in its own file under src/drift/signals/. For changes to an existing signal, keep the work in that signal's existing file unless…
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
- 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
- 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
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 10 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill for non-trivial signal work from decision through validation.
- Very specific: line 28
Use the gate format from .github/instructions/drift-policy.instructions.md before doing design or implementation work.
- Very specific: line 36
use docs/decisions/templates/signal-design-template.md for signal-centric decisions
- Distinctive: line 38
If a calibration materially changes signal behavior, scoring implications, or reviewer trust expectations, treat it as ADR-worthy even when …
- Distinctive: line 73
Keep the implementation deterministic, LLM-free, and fast.
- Very specific: line 77
Add the signal weight entry in src/drift/config.py.
- Distinctive: line 81
Do not treat weight promotion as automatic.
- Very specific: line 85
Use the drift-ground-truth-fixture-development skill to add reproducible coverage in tests/fixtures/ground_truth.py.
- Distinctive: line 92
Add boundary and confounder fixtures when the change is threshold-sensitive or meant to reduce specific false positives or false negatives.
- Distinctive: line 98
Do not rely only on the shared precision/recall suite.
- Very specific: line 100
Add targeted regression tests under tests/ for:
- Distinctive: line 107
If the signal change is non-trivial, make the test names and descriptions specific enough that future reviewers understand the protected …
- Very specific: line 111
Use the drift-risk-audit-artifact-updates skill whenever the signal change triggers POLICY §18.
- Distinctive: line 119
If the change also alters an input/output path or trust boundary, include STRIDE updates as well.
- Distinctive: line 141
Before handoff, confirm the surrounding repo obligations are covered:
- Very specific: line 148
no direct DB or Git imports were added outside ingestion/
- Very specific: line 152
If the change adds a new module or user-visible feature, also check whether README or docs/STUDY.md updates are expected.
- Distinctive: line 158
Do not skip directly from local signal code to push logic.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Drift Signal Development Full Lifecycle Skill
Use this skill for non-trivial signal work from decision through validation.
When To Use
- A new signal is being added
- An existing signal changes materially
- A signal heuristic is recalibrated in a way that affects trust, precision, or recall
- A signal is being prepared for scoring readiness or report-only hardening
Core Rules
- Run the Drift Policy Gate first. Signal work that fails admissibility should stop before design begins.
- ADR before implementation. Non-trivial signal work needs an ADR draft before code changes.
- Every signal must be explicit about scope. Declare
incremental_scopeon the class. - Evidence is mandatory. Signal logic without fixtures, targeted tests, and audit updates is incomplete.
- Optimize for credibility before comfort. Precision, reproducibility, and actionability outrank convenience or breadth.
Step 0: Run The Drift Policy Gate
Use the gate format from .github/instructions/drift-policy.instructions.md before doing design or implementation work.
Step 1: Start With Decision And Design
Before coding:
- decide whether the task is a new signal, a material heuristic change, or a calibration pass
- draft or update the ADR using the
drift-adr-workflowskill - use
docs/decisions/templates/signal-design-template.mdfor signal-centric decisions
If a calibration materially changes signal behavior, scoring implications, or reviewer trust expectations, treat it as ADR-worthy even when it is framed as precision/recall hardening.
The design should already state:
- the problem class
- heuristic outline
- expected FP classes
- expected FN classes
- fixture plan
- validation criterion
Step 2: Implement The Signal Class Correctly
New signal code belongs in its own file under src/drift/signals/. For changes to an existing signal, keep the work in that signal's existing file unless there is a separately justified design change.
Implement the class as a BaseSignal subclass and register it with @register_signal.
Be explicit about:
signal_typenameincremental_scopeuses_embeddingswhen relevant
The core method is:
def analyze(
self,
parse_results: list[ParseResult],
file_histories: dict[str, FileHistory],
config: DriftConfig,
) -> list[Finding]:Keep the implementation deterministic, LLM-free, and fast.
Step 3: Wire The Signal Into Configuration Safely
Add the signal weight entry in src/drift/config.py.
For new signals, default to conservative rollout behavior consistent with repository practice. If the signal is not yet precision-validated, keep it report-only until evidence says otherwise.
Do not treat weight promotion as automatic. That is a separate credibility decision.
Step 4: Build The Ground-Truth Coverage Early
Use the drift-ground-truth-fixture-development skill to add reproducible coverage in tests/fixtures/ground_truth.py.
Baseline expectation for meaningful signal work:
- at least one TP fixture
- at least one TN fixture
Add boundary and confounder fixtures when the change is threshold-sensitive or meant to reduce specific false positives or false negatives.
Vertical-Slice-Regel: Schreibe eine Fixture, implementiere die passende Logik, dann die nächste Fixture. Nicht alle Fixtures zuerst schreiben — Tests gegen noch nicht implementiertes Verhalten prüfen imaginären Code, keinen realen.
Step 5: Add Direct Signal Tests
Do not rely only on the shared precision/recall suite.
Add targeted regression tests under tests/ for:
- critical heuristics
- previously observed failure modes
- crash guards
- edge cases the fixtures alone do not isolate well
If the signal change is non-trivial, make the test names and descriptions specific enough that future reviewers understand the protected behavior quickly.
Step 6: Update Audit Artifacts
Use the drift-risk-audit-artifact-updates skill whenever the signal change triggers POLICY §18.
For signal work, this usually means updating:
audit_results/fmea_matrix.mdaudit_results/fault_trees.mdaudit_results/risk_register.md
If the change also alters an input/output path or trust boundary, include STRIDE updates as well.
Step 7: Run The Right Validation Stack
The minimum validation stack depends on the change, but common checks are:
pytest tests/test_benchmark_structure.py -v
pytest tests/test_precision_recall.py -v
python scripts/check_risk_audit.py --diff-base origin/main
make test-fastFor signal changes, also consider:
- targeted signal tests under
tests/ - mutation benchmark reruns when the signal logic changes materially
drift analyze --repo . --format json --exit-zeromake checkbefore final handoff
Step 8: Finish The Repository-Side Obligations
Before handoff, confirm the surrounding repo obligations are covered:
- the signal has its own file under
src/drift/signals/ - there is a config entry in
src/drift/config.py - tests exist for the new behavior
- audit artifacts were updated when required
- feature evidence exists if the work is a real
feat: - no direct DB or Git imports were added outside
ingestion/
For real feat: work, feature evidence should include a versioned artifact such as benchmark_results/vX.Y.Z_feature_evidence.json plus the supporting tests and summary expected by the feature-evidence gate.
If the change adds a new module or user-visible feature, also check whether README or docs/STUDY.md updates are expected.
Step 9: Hand Off To Commit And Push Workflow
Once design, implementation, fixtures, audits, and validation are in place, move to the repository commit workflow through drift-commit-push.
Do not skip directly from local signal code to push logic.
Review Checklist
- Policy Gate passed for the signal work
- ADR exists or was updated before implementation
- The signal class uses
BaseSignaland@register_signal incremental_scopeis declared explicitly- The config entry was added or updated deliberately
- TP/TN fixture coverage exists
- Direct regression tests protect the critical heuristics
- Audit artifacts were updated where POLICY §18 requires them
- Validation commands cover both structure and behavior
- Final handoff goes through the commit/push workflow rather than bypassing it
References
.github/instructions/drift-policy.instructions.md.github/instructions/drift-quality-workflow.instructions.md.github/skills/drift-adr-workflow/SKILL.md.github/skills/drift-risk-audit-artifact-updates/SKILL.md.github/skills/drift-ground-truth-fixture-development/SKILL.md.github/skills/drift-commit-push/SKILL.mddocs/decisions/templates/signal-design-template.mdsrc/drift/signals/base.pysrc/drift/config.pytests/fixtures/ground_truth.pytests/test_benchmark_structure.pytests/test_precision_recall.pyDEVELOPER.mdCONTRIBUTING.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.

