Skip to content
Back to skills

intent-drift

ASecurity

Detects intent drift in AI-assisted development by comparing the original goal against the current plan and execution context. Run /intent-drift to evaluate whether ongoing work has drifted from what was asked. Triggers on "check intent drift", "are we still on track", "is this aligned with the goal", "did the plan drift", "intent alignment", "scope creep check", "am I off track".

  • 8 stars
  • 0 votes
  • 2 copies
  • 7 views
  • Added September 3, 2026
ai-agentspythongoshellbashgitapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add shauryagangrade/intent-drift-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of intent-drift?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for intent-drift
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shauryagangrade-intent-drift/badge)](https://www.skillsdirectory.com/skills/shauryagangrade-intent-drift)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: intent-drift
description: Detects intent drift in AI-assisted development by comparing the original goal against the current plan and execution context. Run /intent-drift to evaluate whether ongoing work has drifted from what was asked. Triggers on "check intent drift", "are we still on track", "is this aligned with the goal", "did the plan drift", "intent alignment", "scope creep check", "am I off track".
---

# intent-drift

A skill that uses the Intent Alignment Engine to detect whether an AI coding agent's
current work has drifted from the user's original goal.

## Run (when invoked)

**0. Gather inputs** (ask only what you cannot infer from the repo):
- `--original-goal` (required): the user's stated objective, or infer from the
  conversation / issue / PR description if available.
- `--current-plan` (required): what is actually being built right now (steps, branch
  purpose, recent edits), or infer from git state + recent messages.
- `--context` / `--auto-context`: execution evidence (edited files, git diff, recent
  commands). With `--auto-context`, collect automatically (see `scripts/collect_context.py`).
  Auto-context is **repo-only by default**: git diff, commits, edited files, and file
  changes. Your **shell history is never read** unless you pass `--include-shell-history`.
  That opt-in is deliberate — `.bash_history` / `.zsh_history` can contain credentials
  typed into a shell and commands unrelated to the current repo, so it stays off unless
  explicitly requested. Auto-collected context is also **scrubbed by default**: secret-like
  content (tokens, `password=`/`api_key=` assignments, `Authorization:` headers, long
  base64 blobs) is masked before it reaches the analyzer and report exporters. To disable
  the scrub (not recommended), construct `ContextCollector(sanitize_secrets=False)`.
- `--format` (`text` | `markdown` | `json`): output format.
- `--threshold` (default 75): minimum alignment % to be considered "on track".

Do NOT ask if enough is inferable from the repo + conversation — infer and state your
assumptions.

**1. Build the context** and call the analyzer:
```bash
python3 ~/.claude/skills/intent-drift/analyzer.py \
  --original-goal "Reduce memory usage" \
  --current-plan "Optimize startup latency" \
  --context "Edited: main.py, startup.py. Recent: pip install numpy, cProfile main.py" \
  --format text
```
Or in Python:
```python
sys.path.insert(0, str(Path.home() / ".claude" / "skills" / "intent-drift"))
from analyzer import IntentDriftAnalyzer
a = IntentDriftAnalyzer()
rep = a.analyze(a.parse_arguments([
    "--original-goal", "Reduce memory usage",
    "--current-plan", "Optimize startup latency",
]))
print(a.export_report(rep, "text"))
```

**2. Report** to the user:
- Overall alignment %, status (Fully_Aligned → Critical_Drift), and confidence %.
- The recommendation verbatim.
- The 2–3 strongest evidence lines (✅ / ⚠ / ❌) with their source provider.
- If alignment < threshold: highlight the drifted dimension from the breakdown.

**3. If drift is detected**, surface it clearly and suggest pausing to confirm intent
before continuing — do not silently keep building the off-track plan.

## How it works

Nine evidence providers each inspect the same context and emit weighted `Evidence`
(value 0–100, confidence 0–1). The engine computes a weighted score, a consistency-based
confidence, a status band, and a recommendation. Providers live in `providers/`,
exporters in `exporters/`, and auto context collection in `scripts/collect_context.py`.

| Provider | Weight | What it checks |
|----------|--------|----------------|
| goal_provider | 0.25 | Semantic overlap between goal and plan |
| constraint_provider | 0.20 | Constraints satisfied / violated |
| scope_provider | 0.15 | Scope expansion or reduction |
| execution_provider | 0.15 | Commands / edits / reasoning vs goal |
| file_graph_provider | 0.10 | File relationships and patterns |
| dependency_provider | 0.10 | Dependency install/remove vs goal |
| architecture_provider | 0.10 | Architectural change patterns |
| requirement_coverage_provider | 0.08 | Success criteria coverage |
| problematic_findings_provider | 0.07 | Cross-provider problematic patterns |

## Rules
- State assumptions when inferring goal/plan from the repo; never fabricate intent.
- Below-threshold results are a call to confirm, not a reason to abandon good work.
- Prefer `--auto-context` so evidence reflects real repo state, not just prose.
- This skill is a maintainer tool, not a replacement: it pauses and asks for
  confirmation — it never acts autonomously or re-plans the work itself.

## Files
| File | Purpose |
|------|---------|
| `analyzer.py` | CLI + `IntentDriftAnalyzer` (parse → analyze → export) |
| `providers/` | 9 evidence providers + `base.py` |
| `exporters/` | text / markdown / json report exporters |
| `scripts/collect_context.py` | Repo-only context collection (git diff, commits, edited files, file changes) with default-on secret scrubbing; shell history is opt-in via `--include-shell-history` |
| `config/defaults.yaml` | Thresholds, weights, enabled providers |
| `metadata.json` | Importable skill metadata (params, deps) |

Files in this skill

  • .npmignore93 B
  • CHANGELOG.md5.6 KB
  • CODE_OF_CONDUCT.md2.6 KB
  • CONTRIBUTING.md4.1 KB
  • FUNDING.yml286 B
  • ROADMAP.md3.8 KB
  • SECURITY.md1.1 KB
  • SKILL.md5.1 KB
  • __init__.py733 B
  • analyzer.py15.6 KB
  • bin/intent-drift.js3.6 KB
  • config.py7.1 KB
  • config/defaults.yaml1.8 KB
  • docs/api.md3.4 KB
  • docs/architecture.md2.5 KB
  • docs/config.md1.4 KB
  • docs/customizing.md1.5 KB
  • docs/providers.md2.3 KB
  • examples/auto_context.py1.1 KB
  • examples/basic.py1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.