agentleFS
mick-gskmick-gsk/drift/.github/skills/drift-risk-audit-artifact-updates/SKILL.md

drift-risk-audit-artifact-updates

Skill14 starsChanged 7 months agoMITView on GitHub

Drift-specific workflow for updating required audit artifacts after signal, ingestion, output, or architecture changes. Use when FMEA, fault trees, STRIDE, or the risk register must be updated to satisfy POLICY §18 and pre-push gates. Keywords: risk audit, FMEA, STRIDE, fault tree, risk register, Policy 18, audit_results, signal change, trust boundary, precision recall.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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
  1. Very specific:

    Use this skill when a Drift change requires explicit updates to the audit stack under audit_results/.

    line 9
  2. Very specific:

    Before touching the audit stack, use the gate format from .github/instructions/drift-policy.instructions.md.

    line 30
  3. Distinctive:

    Treat a change as material when it changes detection scope, improves or worsens precision/recall in a meaningful way, alters actionable …

    line 45
  4. Distinctive:

    If more than one category applies, update the union of required artifacts.

    line 63
  5. Distinctive:

    Use this mapping exactly:

    line 67
  6. Very specific:

    Use audit_results/fmea_matrix.md for failure-mode thinking.

    line 80
  7. Very specific:

    Use the same scale and table style already present in audit_results/fmea_matrix.md.

    line 92
  8. Distinctive:

    Keep the mitigation specific enough that a reviewer can connect it to tests, heuristics, or evidence.

    line 96
  9. Very specific:

    Use audit_results/fault_trees.md when the change affects causal failure paths for signal quality.

    line 100
  10. Very specific:

    Use audit_results/stride_threat_model.md when the change introduces or alters an input path, output path, or trust boundary.

    line 102
  11. Distinctive:

    Do not write generic text.

    line 104
  12. Very specific:

    Every relevant audit update should leave an operational trace in audit_results/risk_register.md.

    line 108
  13. Distinctive:

    If the change claims a precision or recall shift, the audit entry should say how that delta was observed.

    line 134
  14. Distinctive:

    Use the local checker to confirm the push is not blocked:

    line 138
  15. Very specific:

    If an emergency bypass is considered, prefer the narrowest gate bypass and document the reason.

    line 153

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Drift Risk Audit Artifact Updates Skill

Use this skill when a Drift change requires explicit updates to the audit stack under audit_results/.

When To Use

  • A file under src/drift/signals/ changes materially
  • A file under src/drift/ingestion/ changes materially
  • A file under src/drift/output/ changes materially
  • An input path, output path, or trust boundary changes
  • Precision or recall changes by more than 5 percentage points
  • A push would otherwise fail the risk-audit gate

Core Rules

  1. Run the Drift Policy Gate first. Audit updates do not rescue inadmissible work.
  2. Treat audit artifacts as contracts, not optional docs. POLICY §18 makes them mandatory.
  3. Update the right artifact for the change type. Any audit file is not enough.
  4. Never delete the four protected audit artifacts. The gate checks existence.
  5. Use bypasses only with explicit maintainer approval and a documented emergency reason.

Step 0: Run The Drift Policy Gate

Before touching the audit stack, use the gate format from .github/instructions/drift-policy.instructions.md.

Step 1: Classify The Change

Sort the implementation into one of these categories:

A. Signal changed

Examples:

  • new signal
  • materially changed heuristic
  • changed finding criteria
  • changed scoring-readiness behavior

Treat a change as material when it changes detection scope, improves or worsens precision/recall in a meaningful way, alters actionable output, or changes what reviewers must trust about the signal.

B. Input/output or trust boundary changed

Examples:

  • new ingestion path
  • new output channel
  • changed output contract or trust boundary

C. Precision/recall shifted by more than 5 percentage points

Examples:

  • threshold tuning
  • strong FP reduction
  • recall hardening with measurable delta

If more than one category applies, update the union of required artifacts.

Step 2: Map The Change To Required Artifacts

Use this mapping exactly:

  • Signal changed update audit_results/fmea_matrix.md, audit_results/fault_trees.md, and audit_results/risk_register.md
  • Input/output or trust boundary changed update audit_results/stride_threat_model.md and audit_results/risk_register.md
  • Precision/recall delta > 5% update audit_results/fmea_matrix.md and audit_results/risk_register.md

The machine gate in scripts/check_risk_audit.py checks for the presence of audit updates. POLICY §18 still requires the correct artifact combination for the specific change type, so update the full required set for your case.

Step 3: Update The FMEA Matrix Correctly

Use audit_results/fmea_matrix.md for failure-mode thinking.

At minimum, capture:

  • signal
  • failure mode
  • cause
  • effect
  • detection
  • mitigation
  • S, O, D, and RPN

Use the same scale and table style already present in audit_results/fmea_matrix.md. RPN must be calculated as S x O x D.

For signal changes, add at least one expected false-positive mode and one expected false-negative mode.

Keep the mitigation specific enough that a reviewer can connect it to tests, heuristics, or evidence.

Step 4: Update Fault Trees Or STRIDE As Needed

Use audit_results/fault_trees.md when the change affects causal failure paths for signal quality.

Use audit_results/stride_threat_model.md when the change introduces or alters an input path, output path, or trust boundary.

Do not write generic text. The artifact should name the concrete path, component, or causal chain that changed.

Step 5: Update The Risk Register

Every relevant audit update should leave an operational trace in audit_results/risk_register.md.

Capture:

  • risk ID
  • affected component
  • type of risk
  • description
  • trigger examples
  • impact
  • mitigation
  • verification
  • residual risk

Trigger examples should be concrete enough to recognize the failure mode again.

Step 6: Tie Audit Updates To Evidence

Audit text without verification is weak. Reference the concrete checks that support the update, for example:

pytest tests/test_precision_recall.py -v
pytest tests/test_mutant_duplicates_edge_cases.py -q --maxfail=1
python scripts/check_risk_audit.py --diff-base origin/main

If the change claims a precision or recall shift, the audit entry should say how that delta was observed.

Step 7: Validate Before Push

Use the local checker to confirm the push is not blocked:

python scripts/check_risk_audit.py --diff-base origin/main

Also ensure the four protected files still exist:

  • audit_results/fmea_matrix.md
  • audit_results/stride_threat_model.md
  • audit_results/fault_trees.md
  • audit_results/risk_register.md

Step 8: Handle Exceptions Conservatively

If an emergency bypass is considered, prefer the narrowest gate bypass and document the reason. For this gate, that usually means DRIFT_SKIP_RISK_AUDIT=1 rather than DRIFT_SKIP_HOOKS=1.

Review Checklist

  • Policy Gate passed for the underlying change
  • The change type was classified correctly
  • The correct audit artifact set was updated
  • FMEA entries include FP/FN thinking where required
  • Fault-tree or STRIDE updates are concrete rather than generic
  • Risk Register entry includes trigger examples and verification
  • Verification commands are named explicitly
  • The local risk-audit checker is expected to pass
  • No protected audit artifact was removed

References

  • .github/instructions/drift-policy.instructions.md
  • .github/instructions/drift-push-gates.instructions.md
  • .github/instructions/drift-quality-workflow.instructions.md
  • .github/skills/drift-commit-push/SKILL.md
  • scripts/check_risk_audit.py
  • audit_results/fmea_matrix.md
  • audit_results/fault_trees.md
  • audit_results/stride_threat_model.md
  • audit_results/risk_register.md
  • CONTRIBUTING.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.