datarobot-oss/datarobot-agent-skills / skills/datarobot-gap-analysis
datarobot-gap-analysis
FlaggedUse when the user wants to assess whether an AI agent repository (DataRobot-built or not) is enterprise-ready, run a gap analysis / readiness scan against security, governance, reliability, or regulatory standards, score an agent against EU AI Act requirements, or find and fix gaps (secrets, unpinned models, missing CI, missing guardrails, over-permissioned identity, etc.) before deploying an agent to production. Works on any repository, not only ones built with DataRobot.
scripts/gap_analysis/agent_prompt.py
View on GitHub# Copyright (c) 2026 DataRobot, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""A self-contained prompt per finding for the user's own coding agent.
The report cannot ship file contents, so the prompt carries the citation,
the evidence, the reasoning and the guardrails; the receiving agent has the
repository and can read, edit and run tests the way a one-shot edit cannot.
"""
from __future__ import annotations
from . import paths
from .models import Finding
_RAILS = (
"Work on a new branch. Read the cited file and its call sites before editing. "
"Make the smallest change that closes the gap, keep the existing style, and run "
"the test suite. Do not push or open a pull request; stop and show me the diff."
)
def _guidance(f: Finding) -> str:
"""The condition's fix guidance from its prompt file, when it has one."""
if not f.fix_strategy or not str(f.fix_strategy).endswith(".md"):
return ""
try:
text = paths.resolve(f.fix_strategy).read_text()
except (OSError, ValueError):
return ""
body = [
line
for line in text.splitlines()
if line.strip() and not line.startswith("#") and "_fix_contract" not in line
]
return " ".join(line.strip() for line in body)
def agent_prompt(f: Finding, repo: str = "") -> str:
where = f.file or "repo-wide"
if f.file and f.line:
where = f"{f.file}:{f.line}"
lines = [
f"In the repository at {repo or '<repo>'}, fix this gap-analysis finding.",
"",
f"Finding: {f.condition_id}, {f.title} (severity {f.severity.value}).",
f"Where: {where}",
f"Evidence: {f.evidence or 'see the file'}",
]
if f.explanation:
lines.append(f"Why it matters: {f.explanation}")
if f.verification:
lines.append(f"A verification pass noted: {f.verification}")
if f.remediation:
lines.append(f"Expected fix: {f.remediation}")
guidance = _guidance(f)
if guidance:
lines.append(f"Guidance: {guidance}")
if f.steps:
lines.append("Steps:")
lines.extend(f" {i}. {step}" for i, step in enumerate(f.steps, 1))
if f.prerequisite:
lines.append(f"Prerequisite: {f.prerequisite}")
if f.docs_url:
lines.append(f"Docs: {f.docs_url}")
if f.fix_risk == "business_logic":
lines.append(
"This touches business logic: preserve behaviour and add or extend a test "
"that proves the gap is closed."
)
lines += ["", _RAILS]
return "\n".join(lines)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |