Intent Drift

CLI Usage Transcript

A faithful record of npx intent-drift runs - every flag, both output formats, the Windows encoding quirk, and the goal-provider gap the session exposed.

Environment: Windows, Node v24.19.0, npm 11.17.0, Python 3.14.6.Repos probed: shauryagangrade/intent-drift (Python library clone) and theintent-drift npm wrapper (npx intent-drift, v1.0.3 -> engine v1.0.0). Note: an initial encoding error ('charmap' codec can't encode character '❌')occurred on first run; setting PYTHONIOENCODING=utf-8 fixed it - the wrapper'semoji output does not survive the default Windows console codec.

First run / environment

$ npx -y intent-drift --original-goal "Reduce application memory usage" --current-plan "Optimize startup performance" --context "Edited: startup.py, main.py"intent-drift: first run - creating ~/.intent-drift-venv (installs the intent-drift engine).Error during analysis: 'charmap' codec can't encode character '❌' in position 340: character maps to <undefined>
$ $env:PYTHONIOENCODING = 'utf-8'
$ npx -y intent-drift --original-goal "Reduce application memory usage" --current-plan "Optimize startup performance" --context "Edited: startup.py, main.py"Intent Alignment Report==================================================Overall Alignment: 75.27777777777779%Status: Minor_DriftConfidence: 68.7% Summary:Current work shows minor drift from the original goal. Strongest alignment in constraint provider (100%); weakest in goal provider (0%). Evidence:  1. [goal_provider] ❌ Significant goal substitution: current work has diverged from the original intent. (plan align=0.00, exec align=0.00)  2. [constraint_provider] ✅ No explicit constraints declared; assuming no constraint violations.  3. [scope_provider] ✅ Work stays within the original scope. (expansion markers=0, files=0, net +0)  4. [architecture_provider] ✅ Architecture: change appears structurally targeted (files=0, +0/-0)  5. [execution_provider] ⚠ No execution narrative available; assuming alignment.  6. [file_graph_provider] ⚠ No edited files recorded; assuming neutral focus.  7. [dependency_provider] ✅ No new dependency signals detected. (dependency signals=0)  8. [requirement_coverage_provider] ✅ No explicit success criteria declared; assuming partial coverage.  9. [problematic_findings_provider] ✅ No problematic patterns detected in execution. Risk: Moderate risk: goal provider shows concerning divergence (0%).Recommendation: Continue with minor monitoring. Review the lowest-scoring dimension for early drift indicators. Component Scores:  goal_provider: 0.0%  constraint_provider: 100.0%  scope_provider: 100.0%  architecture_provider: 100.0%  execution_provider: 70.0%  file_graph_provider: 70.0%  dependency_provider: 100.0%  requirement_coverage_provider: 80.0%  problematic_findings_provider: 100.0%Report generated at: 2026-09-18 10:31:49

Auto-context (git signals collected from cwd)

$ npx -y intent-drift --original-goal "Reduce application memory usage" --current-plan "Optimize startup performance" --auto-contextWarning: Alignment score 60.277777777777786% is below threshold 75%Intent Alignment Report==================================================Overall Alignment: 60.277777777777786%Status: Moderate_DriftConfidence: 67.8% Summary:Current work shows moderate drift from the original goal. Strongest alignment in constraint provider (100%); weakest in file graph provider (0%). Evidence:  1. [goal_provider] ❌ Significant goal substitution: current work has diverged from the original intent. (plan align=0.00, exec align=0.00)  2. [constraint_provider] ✅ No explicit constraints declared; assuming no constraint violations.  3. [scope_provider] ✅ Work stays within the original scope. (expansion markers=0, files=52, net +0)  4. [architecture_provider] ⚠ Architecture: large number of new files suggests overengineering (files=52, +0/-0)  5. [execution_provider] ⚠ No execution narrative available; assuming alignment.  6. [file_graph_provider] ❌ Editing activity has scattered away from the intended area. (1/52 files relevant)  7. [dependency_provider] ✅ No new dependency signals detected. (dependency signals=0)  8. [requirement_coverage_provider] ✅ No explicit success criteria declared; assuming partial coverage.  9. [problematic_findings_provider] ✅ No problematic patterns detected in execution. Risk: High risk: Multiple areas show significant drift (goal provider, architecture provider, file graph provider).Recommendation: Pause and reassess. Significant drift detected; consider realigning current work with original objectives. Component Scores:  goal_provider: 0.0%  constraint_provider: 100.0%  scope_provider: 80.0%  architecture_provider: 50.0%  execution_provider: 70.0%  file_graph_provider: 0.0%  dependency_provider: 100.0%  requirement_coverage_provider: 80.0%  problematic_findings_provider: 100.0%Report generated at: 2026-09-18 10:31:54

Plain text usage example

$ npx -y intent-drift --original-goal "Improve response time" --current-plan "Add database indexing" --context "Edited: db.py, queries.py"Intent Alignment Report==================================================Overall Alignment: 75.27777777777779%Status: Minor_DriftConfidence: 68.7% Summary:Current work shows minor drift from the original goal. Strongest alignment in constraint provider (100%); weakest in goal provider (0%). Evidence:  1. [goal_provider] ❌ Significant goal substitution: current work has diverged from the original intent. (plan align=0.00, exec align=0.00)  2. [constraint_provider] ✅ No explicit constraints declared; assuming no constraint violations.  3. [scope_provider] ✅ Work stays within the original scope. (expansion markers=0, files=0, net +0)  4. [architecture_provider] ✅ Architecture: change appears structurally targeted (files=0, +0/-0)  5. [execution_provider] ⚠ No execution narrative available; assuming alignment.  6. [file_graph_provider] ⚠ No edited files recorded; assuming neutral focus.  7. [dependency_provider] ✅ No new dependency signals detected. (dependency signals=0)  8. [requirement_coverage_provider] ✅ No explicit success criteria declared; assuming partial coverage.  9. [problematic_findings_provider] ✅ No problematic patterns detected in execution. Risk: Moderate risk: goal provider shows concerning divergence (0%).Recommendation: Continue with minor monitoring. Review the lowest-scoring dimension for early drift indicators. Component Scores:  goal_provider: 0.0%  constraint_provider: 100.0%  scope_provider: 100.0%  architecture_provider: 100.0%  execution_provider: 70.0%  file_graph_provider: 70.0%  dependency_provider: 100.0%  requirement_coverage_provider: 80.0%  problematic_findings_provider: 100.0%Report generated at: 2026-09-18 10:31:54

--history (persisted timeline)

$ npx -y intent-drift --historyIntent-drift history (4 runs)----------------------------------------  1. [2026-09-18 10:31] 75.3% - Minor_Drift  2. [2026-09-18 10:31] 75.3% - Minor_Drift  3. [2026-09-18 10:31] 60.3% - Moderate_Drift  4. [2026-09-18 10:31] 75.3% - Minor_Drift

--help

$ npx -y intent-drift --helpintent-drift - analyze intent drift in AI-assisted development Usage:  analyzer.py --original-goal GOAL --current-plan PLAN [options] Options:  --original-goal GOAL   The user's stated objective (required, unless inferred).  --current-plan PLAN    What is actually being built right now (required, unless inferred).  --context TEXT         Execution evidence (edited files, git diff, recent commands).                         Default: "auto".  --auto-context         Collect execution context automatically via                         scripts/collect_context.py. Overrides --context.                         Repo-only signals (git diff, commits, edited files,                         file changes); shell history is NOT read.  --include-shell-history                         With --auto-context, also read recent shell commands                         from ~/.bash_history / ~/.zsh_history / ~/.history.                         Opt-in: shell history may contain credentials or                         commands unrelated to this repo.  --format FORMAT        Output format: text | markdown | json. Default: text.  --threshold N          Minimum alignment % considered "on track" (0-100).                         Default: 75.  --history              Print the persisted score timeline and exit.  --compare N            After the report, compare this run with the one N                         runs ago (trend + drift acceleration). Default: off.  -h, --help             Show this help screen and exit.  -V, --version          Show the installed version and exit. Examples:  analyzer.py --original-goal "Reduce memory usage" --current-plan "Improve startup"  analyzer.py --original-goal "Add feature" --current-plan "Change architecture" \    --auto-context --format json --threshold 80

Aligned case (goal matches plan)

Even a clearly aligned goal and plan score goal_provider at 0%, because the CLI does not feed the goal text where goal_provider can read it.

$ npx -y intent-drift --original-goal "Fix the authentication bug when a user logs in with an expired session token" --current-plan "Fix auth session expiry handling" --context "Edited: auth.py, session.py; fixed expired token validation"Intent Alignment Report==================================================Overall Alignment: 75.27777777777779%Status: Minor_DriftConfidence: 68.7% Summary:Current work shows minor drift from the original goal. Strongest alignment in constraint provider (100%); weakest in goal provider (0%). Evidence:  1. [goal_provider] ❌ Significant goal substitution: current work has diverged from the original intent. (plan align=0.00, exec align=0.00)  2. [constraint_provider] ✅ No explicit constraints declared; assuming no constraint violations.  3. [scope_provider] ✅ Work stays within the original scope. (expansion markers=0, files=0, net +0)  4. [architecture_provider] ✅ Architecture: change appears structurally targeted (files=0, +0/-0)  5. [execution_provider] ⚠ No execution narrative available; assuming alignment.  6. [file_graph_provider] ⚠ No edited files recorded; assuming neutral focus.  7. [dependency_provider] ✅ No new dependency signals detected. (dependency signals=0)  8. [requirement_coverage_provider] ✅ No explicit success criteria declared; assuming partial coverage.  9. [problematic_findings_provider] ✅ No problematic patterns detected in execution. Risk: Moderate risk: goal provider shows concerning divergence (0%).Recommendation: Continue with minor monitoring. Review the lowest-scoring dimension for early drift indicators. Component Scores:  goal_provider: 0.0%  constraint_provider: 100.0%  scope_provider: 100.0%  architecture_provider: 100.0%  execution_provider: 70.0%  file_graph_provider: 70.0%  dependency_provider: 100.0%  requirement_coverage_provider: 80.0%  problematic_findings_provider: 100.0%Report generated at: 2026-09-18 10:32:10

Heavily drifted case

A rewrite-level plan versus a settings-page goal still reports 75.3% Minor_Drift - the same ceiling as every other short CLI context.

$ npx -y intent-drift --original-goal "Add dark mode to the settings page" --current-plan "Rewrite the whole frontend in a new framework" --context "Edited: App.vue, router.js, api/client.js"Intent Alignment Report==================================================Overall Alignment: 75.27777777777779%Status: Minor_DriftConfidence: 68.7% Summary:Current work shows minor drift from the original goal. Strongest alignment in constraint provider (100%); weakest in goal provider (0%). Evidence:  1. [goal_provider] ❌ Significant goal substitution: current work has diverged from the original intent. (plan align=0.00, exec align=0.00)  2. [constraint_provider] ✅ No explicit constraints declared; assuming no constraint violations.  3. [scope_provider] ✅ Work stays within the original scope. (expansion markers=0, files=0, net +0)  4. [architecture_provider] ✅ Architecture: change appears structurally targeted (files=0, +0/-0)  5. [execution_provider] ⚠ No execution narrative available; assuming alignment.  6. [file_graph_provider] ⚠ No edited files recorded; assuming neutral focus.  7. [dependency_provider] ✅ No new dependency signals detected. (dependency signals=0)  8. [requirement_coverage_provider] ✅ No explicit success criteria declared; assuming partial coverage.  9. [problematic_findings_provider] ✅ No problematic patterns detected in execution. Risk: Moderate risk: goal provider shows concerning divergence (0%).Moderate risk: goal provider shows concerning divergence (0%).Recommendation: Continue with minor monitoring. Review the lowest-scoring dimension for early drift indicators. Component Scores:  goal_provider: 0.0%  constraint_provider: 100.0%  scope_provider: 100.0%  architecture_provider: 100.0%  execution_provider: 70.0%  file_graph_provider: 70.0%  dependency_provider: 100.0%  requirement_coverage_provider: 80.0%  problematic_findings_provider: 100.0%Report generated at: 2026-09-18 10:32:11

--compare (trend + drift acceleration)

$ npx -y intent-drift --original-goal "Improve response time" --current-plan "Add database indexing" --context "Edited: db.py, queries.py" --compare 2Intent Alignment Report==================================================Overall Alignment: 75.27777777777779%Status: Minor_DriftConfidence: 68.7% Summary:Current work shows minor drift from the original goal. Strongest alignment in constraint provider (100%); weakest in goal provider (0%). Evidence:  1. [goal_provider] ❌ Significant goal substitution: current work has diverged from the original intent. (plan align=0.00, exec align=0.00)  2. [constraint_provider] ✅ No explicit constraints declared; assuming no constraint violations.  3. [scope_provider] ✅ Work stays within the original scope. (expansion markers=0, files=0, net +0)  4. [architecture_provider] ✅ Architecture: change appears structurally targeted (files=0, +0/-0)  5. [execution_provider] ⚠ No execution narrative available; assuming alignment.  6. [file_graph_provider] ⚠ No edited files recorded; assuming neutral focus.  7. [dependency_provider] ✅ No new dependency signals detected. (dependency signals=0)  8. [requirement_coverage_provider] ✅ No explicit success criteria declared; assuming partial coverage.  9. [problematic_findings_provider] ✅ No problematic patterns detected in execution. Risk: Moderate risk: goal provider shows concerning divergence (0%).Recommendation: Continue with minor monitoring. Review the lowest-scoring dimension for early drift indicators. Component Scores:  goal_provider: 0.0%  constraint_provider: 100.0%  scope_provider: 100.0%  architecture_provider: 100.0%  execution_provider: 70.0%  file_graph_provider: 70.0%  dependency_provider: 100.0%  requirement_coverage_provider: 80.0%  problematic_findings_provider: 100.0%Report generated at: 2026-09-18 10:32:18 Trend vs 2 runs ago: 75.3% (2026-09-18 10:32) -> 75.3% (2026-09-18 10:32) (delta +0.0 pts, +0.0 pts/run)Verdict: steadyDrift acceleration: latest run +0.0 pts vs +0.0 pts/run average -> stable trend

--format json (excerpt: top-level + timeline)

$ npx -y intent-drift --original-goal "Reduce application memory usage" --current-plan "Optimize startup performance" --context "Edited: startup.py" --format json{  "overall_alignment": 75.27777777777779,  "status": "Minor_Drift",  "confidence": 68.7,  "summary": "Current work shows minor drift from the original goal. Strongest alignment in constraint provider (100%); weakest in goal provider (0%).",  "evidence": [ ... 9 providers, each {source, value, confidence, details} ... ],  "risk": "Moderate risk: goal provider shows concerning divergence (0%).",  "recommendation": "Continue with minor monitoring. Review the lowest-scoring dimension for early drift indicators.",  "breakdown": {    "goal_provider":          { "name": "goal_provider",          "weight": 0.16666666666666666, "score": 0.0   },    "constraint_provider":    { "name": "constraint_provider",    "weight": 0.1388888888888889,  "score": 100.0 },    "scope_provider":         { "name": "scope_provider",         "weight": 0.11111111111111112, "score": 100.0 },    "architecture_provider":  { "name": "architecture_provider",  "weight": 0.1388888888888889,  "score": 100.0 },    "execution_provider":     { "name": "execution_provider",     "weight": 0.11111111111111112, "score": 70.0  },    "file_graph_provider":    { "name": "file_graph_provider",    "weight": 0.08333333333333333, "score": 70.0  },    "dependency_provider":    { "name": "dependency_provider",    "weight": 0.05555555555555556, "score": 100.0 },    "requirement_coverage_provider": { "name": "requirement_coverage_provider", "weight": 0.11111111111111112, "score": 80.0 },    "problematic_findings_provider": { "name": "problematic_findings_provider", "weight": 0.08333333333333333, "score": 100.0 }  },  "timeline": [    { "timestamp": 1789720304, "score": 75.27777777777779,  "note": "Minor_Drift" },    { "timestamp": 1789720309, "score": 75.27777777777779,  "note": "Minor_Drift" },    { "timestamp": 1789720314, "score": 60.277777777777786, "note": "Moderate_Drift" },    ... continued per run ...  ],  "generated_at": "2026-09-18T10:32:18.534727"}

--format markdown inside a real git repo, --auto-context

$ npx -y intent-drift --original-goal "Kick off the release process" --current-plan "Refactor the provider base class" --auto-context --format markdownWarning: Alignment score 60.277777777777786% is below threshold 75%# Intent Alignment Report ## Summary- **Overall Alignment**: 60.277777777777786%- **Status**: Moderate_Drift- **Confidence**: 67.8%- **Risk**: High risk: Multiple areas show significant drift (goal provider, architecture provider, file graph provider). ## AnalysisCurrent work shows moderate drift from the original goal. Strongest alignment in constraint provider (100%); weakest in file graph provider (0%). ## Evidence1. **goal_provider** ❌ Significant goal substitution: current work has diverged from the original intent. (plan align=0.00, exec align=0.00) (confidence: 50.0%)2. **constraint_provider** ✅ No explicit constraints declared; assuming no constraint violations. (confidence: 40.0%)3. **scope_provider** ✅ Work stays within the original scope. (expansion markers=0, files=39, net +0) (confidence: 80.0%)4. **architecture_provider** ⚠ Architecture: large number of new files suggests overengineering (files=39, +0/-0) (confidence: 50.0%)5. **execution_provider** ⚠ No execution narrative available; assuming alignment. (confidence: 40.0%)6. **file_graph_provider** ❌ Editing activity has scattered away from the intended area. (1/39 files relevant) (confidence: 75.0%)7. **dependency_provider** ✅ No new dependency signals detected. (dependency signals=0) (confidence: 50.0%)8. **requirement_coverage_provider** ✅ No explicit success criteria declared; assuming partial coverage. (confidence: 40.0%)9. **problematic_findings_provider** ✅ No problematic patterns detected in execution. (confidence: 50.0%) ## RecommendationPause and reassess. Significant drift detected; consider realigning current work with original objectives. ## Component Breakdown| Component | Score ||-----------|-------|| goal_provider | 0.0% || constraint_provider | 100.0% || scope_provider | 80.0% || architecture_provider | 50.0% || execution_provider | 70.0% || file_graph_provider | 0.0% || dependency_provider | 100.0% || requirement_coverage_provider | 80.0% || problematic_findings_provider | 100.0% |*Report generated at 2026-09-18 10:32:29*

--version

$ npx -y intent-drift --versionintent-drift 1.0.0

Notes for the review

  • Windows encoding bug (wrapper side): the CLI crashes on first run under the default console codec for the ❌ emoji; PYTHONIOENCODING=utf-8 is required.
  • Goal provider always 0.0 in the CLI: identical CLI-shaped contexts score plan align=0.00, exec align=0.00 regardless of whether goal/plan actually match - even the clearly aligned auth case. The CLI's text->context mapping does not feed the goal text where goal_provider can see it. This is a real gap versus the Python library (whose examples/example_usage.py scores about 50-92%).
  • "No data" is not "no evidence": every short/empty context collapses to the same 75.28 Minor_Drift with goal 0%, consistent with the library's known silent-default behaviors documented in intent-drift-feedback.md.
  • History/timeline plumbing works (scores persist across runs, --history and --compare render them).