QUANTITATIVE skill for validating wave deliverables against goal milestones using 0-100% alignment scoring. Prevents scope drift, detects misalignment, enforces goal-wave consistency. Requires goal-management for milestone data. Essential for multi-wave projects to maintain North Star alignment throughout execution.
Validates wave deliverables against goal milestones using 0-100% alignment scoring. Automatically triggers before wave execution to prevent scope drift and after completion to verify milestone delivery.
/plugin marketplace add krzemienski/shannon-framework/plugin install shannon@shannon-frameworkThis skill is limited to using the following tools:
examples/wave-validation-example.mdtests/RED_PHASE_BASELINE.mdtests/REFACTOR_PHASE_PRESSURE.mdtests/TDD_REPORT.mdThis skill implements Shannon Framework's quantitative goal-wave alignment validation system. It calculates 0-100% alignment scores between wave deliverables and goal milestones, detects scope drift, and enforces goal consistency throughout wave execution.
Core Value: Prevents wasted effort by ensuring every wave delivers against actual goal milestones, not assumed requirements.
Use this skill in these situations:
MANDATORY (Must Use):
RECOMMENDED (Should Use):
CONDITIONAL (May Use):
DO NOT rationalize skipping goal-alignment because:
Required:
mode (string): Operation mode
"validate": Validate wave-goal alignment (pre-wave)"verify": Verify wave deliverables (post-wave)"detect-drift": Check for scope drift"quantify": Force quantification of qualitative goalsMode-Specific Inputs:
For "validate" mode (pre-wave):
wave_number (integer): Wave being validatedwave_deliverables (array): List of deliverable descriptionsgoal_id (string): Active goal from goal-managementFor "verify" mode (post-wave):
wave_number (integer): Completed waveactual_deliverables (array): What was actually deliveredgoal_id (string): Active goalFor "detect-drift" mode:
goal_id (string): Active goalconversation_context (optional): Recent messages to scanFor "quantify" mode:
goal_text (string): Vague goal to quantifydomain (optional): Project domain for contextPurpose: Prevent misaligned wave execution by validating BEFORE work begins
Step 1: Retrieve Active Goal
Step 2: Extract Wave Deliverables
Step 3: Map Deliverables to Milestones
Step 4: Calculate Alignment Score
alignment_score = (sum(deliverable_milestone_matches) / count(deliverables)) * 100
Where:
- deliverable_milestone_matches = similarity score per deliverable (0.0-1.0)
- Perfect alignment = 100% (all deliverables map to milestones)
- No alignment = 0% (no deliverables match milestones)
Step 5: Check for Excess Deliverables
Step 6: Check for Scope Mismatch
Step 7: Generate Recommendation
Step 8: Output Report
Purpose: Confirm completed wave actually delivered against goal milestone
Step 1: Retrieve Goal Progress
Step 2: Load Wave Deliverables
Step 3: Validate Milestone Completion
Step 4: Calculate Deliverable Coverage
coverage_score = (milestones_completed / milestones_targeted) * 100
Where:
- milestones_completed = count of milestones with satisfied criteria
- milestones_targeted = count of milestones wave intended to complete
Step 5: Detect Incomplete Milestones
Step 6: Update Goal Progress
Step 7: Output Verification Report
Purpose: Catch implicit scope expansion before it becomes permanent
Step 1: Load Active Goal
Step 2: Scan Conversation Context
Step 3: Extract Implicit Features
Step 4: Calculate Scope Expansion
expansion_ratio = (new_features / original_milestones) * 100
Thresholds:
- expansion <= 20%: Normal (minor clarifications)
- 20% < expansion <= 50%: Moderate (review recommended)
- expansion > 50%: High (alert required)
Step 5: Generate Drift Alert
Step 6: Recommend Action
Purpose: Convert vague/qualitative goals into measurable criteria
Step 1: Parse Goal Text
Step 2: Extract Implicit Metrics
Step 3: Prompt for Quantification
You said: "Make platform more scalable"
Quantify "scalable":
- Current: 100 concurrent users
- Target: ____ concurrent users?
OR:
- Response time: ____ ms (p95)?
- Throughput: ____ requests/second?
Step 4: Validate Quantified Criteria
Step 5: Store Quantified Goal
Step 6: Output Quantified Goal
Core Formula:
alignment_score = (Σ(deliverable_similarity_i) / count(deliverables)) * 100
Where:
deliverable_similarity_i = keyword_overlap(deliverable_i, best_matching_milestone)
keyword_overlap(A, B) = |tokens(A) ∩ tokens(B)| / |tokens(A) ∪ tokens(B)|
Scores:
- 1.0 = Perfect match (all keywords overlap)
- 0.7-0.9 = Strong match (most keywords overlap)
- 0.3-0.6 = Partial match (some keywords overlap)
- 0.0-0.2 = No match (minimal/no overlap)
Example Calculation:
Goal milestone: "User Authentication with email/password" Wave deliverable: "OAuth 2.0 social login"
Tokenization:
Overlap:
Result: Poor alignment (wrong auth type)
Thresholds:
Adjustment Factors:
🚨 PROTOCOL ENFORCEMENT 🚨
This section addresses every rationalization pattern from RED phase baseline:
Detection: Wave plan created without explicit validation
Violation: Skip alignment check for "clear" cases
Counter-Argument:
Protocol: Validate ALL waves, regardless of perceived clarity. Run alignment scoring.
Detection: Single-milestone goal, validation skipped
Violation: Assume simple goals don't drift
Counter-Argument:
Protocol: Validate all goals, complexity-independent. Simple goals still need alignment.
Detection: Time pressure, skip validation to "move faster"
Violation: Trade validation for perceived speed
Counter-Argument:
Protocol: Alignment checks are mandatory infrastructure, not optional overhead.
Detection: Alignment score 60-80%, proceed anyway
Violation: Accept partial alignment as "good enough"
Counter-Argument:
Protocol: Minimum 90% alignment required. Below threshold triggers review.
Detection: Wave execution without user-requested validation
Violation: Treat alignment as optional feature
Counter-Argument:
Protocol: Alignment validation is automatic framework behavior, not opt-in feature.
Detection: Features added without goal updates, accepted as normal
Violation: Treat scope expansion as inevitable
Counter-Argument:
Protocol: All scope changes update goal explicitly. Drift detection alerts on 20%+ expansion.
This skill is QUANTITATIVE type with mandatory invocation:
validate modeverify modedetect-drift modequantify mode (before goal-management storage)Violation Detection: If you find yourself thinking:
STOP. You are rationalizing. Return to workflow. Run alignment scoring.
These rules close loopholes identified during REFACTOR phase adversarial testing:
No Threshold Rounding:
No Similarity Inflation:
No Partial Completion:
Cumulative Drift Tracking:
Vague Term Blacklist:
High Drift Blocks:
Excess Deliverable Threshold:
Wave Reordering Detection:
Exact Technology Match:
Drift Persistence:
Pressure Test Validation: These rules passed 10/10 adversarial scenarios (REFACTOR phase)
For "validate" mode:
{
"success": true,
"mode": "validate",
"wave_number": 2,
"alignment_score": 92,
"threshold": "GREEN",
"recommendation": "CONTINUE",
"deliverable_mapping": [
{
"deliverable": "Stripe integration",
"milestone": "Payment Processing",
"similarity": 0.95,
"status": "aligned"
},
{
"deliverable": "Checkout UI",
"milestone": "Payment Processing",
"similarity": 0.88,
"status": "aligned"
}
],
"excess_deliverables": [],
"action_items": [],
"validation": "Wave 2 aligns with Payment Processing milestone. Proceed."
}
For "verify" mode:
{
"success": true,
"mode": "verify",
"wave_number": 2,
"coverage_score": 100,
"milestones_completed": ["Payment Processing"],
"milestones_incomplete": [],
"goal_progress_update": {
"before": 40,
"after": 70,
"change": "+30%"
},
"verification": "Wave 2 completed Payment Processing milestone. Goal 70% complete."
}
For "detect-drift" mode:
{
"success": true,
"mode": "detect-drift",
"drift_detected": true,
"expansion_ratio": 33,
"threshold": "MODERATE",
"new_features": [
"Social login integration",
"Password reset flow",
"Email verification"
],
"original_milestones": 3,
"new_features_count": 1,
"recommendation": "UPDATE_GOAL",
"alert": "⚠️ Scope expanded by 33% (1 new feature detected)",
"action": "Run /shannon:north_star update to add new milestone"
}
For "quantify" mode:
{
"success": true,
"mode": "quantify",
"original_goal": "Make platform more scalable",
"qualitative_terms": ["scalable"],
"quantified_goal": "Support 10,000 concurrent users with p95 latency < 200ms",
"metrics": [
{
"term": "scalable",
"metric": "concurrent_users",
"target": 10000,
"test_method": "Load testing with JMeter"
},
{
"term": "scalable",
"metric": "p95_latency",
"target": 200,
"unit": "ms",
"test_method": "Performance profiling"
}
],
"success_criteria": "Load test passes with 10K users, p95 < 200ms"
}
This skill succeeds if:
Validation:
def validate_goal_alignment(wave, goal):
# Check 1: Alignment score calculated
result = skill.validate(wave_number=wave.number, goal_id=goal.id)
assert "alignment_score" in result
assert 0 <= result["alignment_score"] <= 100
# Check 2: Threshold recommendation
assert result["recommendation"] in ["CONTINUE", "ADJUST", "HALT"]
if result["alignment_score"] >= 90:
assert result["recommendation"] == "CONTINUE"
elif result["alignment_score"] < 70:
assert result["recommendation"] == "HALT"
# Check 3: Deliverable mapping
assert "deliverable_mapping" in result
for mapping in result["deliverable_mapping"]:
assert 0.0 <= mapping["similarity"] <= 1.0
assert mapping["milestone"] in goal.milestones
# Check 4: Drift detection
drift = skill.detect_drift(goal_id=goal.id)
if drift["new_features_count"] > 0:
assert drift["expansion_ratio"] > 0
assert drift["recommendation"] in ["UPDATE_GOAL", "DEFER", "REJECT"]
Wrong:
Alignment score: 72%
Claude: "Close enough, proceeding with wave."
Right:
Alignment score: 72% (threshold: 70%)
Claude: "⚠️ YELLOW threshold. Review deliverables:
- Deliverable 'Admin UI' has 0.2 similarity to goal milestones
- Recommend: Remove admin UI OR add Admin milestone to goal"
Why: Partial alignment accumulates drift over multiple waves.
Wrong:
User: "Add social login"
Claude: [Adds feature without goal update]
Right:
User: "Add social login"
Claude: [Runs detect-drift]
"⚠️ New feature detected not in goal. Options:
1. Update goal: Add 'Social Login' milestone (+15% weight)
2. Defer: Add to backlog for future goal
3. Reject: Clarify out of scope"
Why: Untracked scope breaks progress metrics and goal completion clarity.
Wrong:
Alignment: "Wave 2 seems to match the goal"
[No score, no mapping, subjective assessment]
Right:
Alignment Score: 94%
Mapping:
- "Stripe integration" → "Payment Processing" (0.95 similarity)
- "Checkout UI" → "Payment Processing" (0.88 similarity)
Recommendation: CONTINUE (GREEN threshold)
Why: Quantitative scoring eliminates subjective "seems like" reasoning.
Input:
{
"mode": "validate",
"wave_number": 1,
"wave_deliverables": [
"Email/password authentication",
"User registration form",
"Login session management"
],
"goal_id": "GOAL-20251103T143000"
}
Goal Context:
Process:
Output:
{
"alignment_score": 93,
"threshold": "GREEN",
"recommendation": "CONTINUE",
"validation": "Wave 1 highly aligned with User Authentication milestone"
}
Input:
{
"mode": "validate",
"wave_number": 2,
"wave_deliverables": [
"Admin dashboard",
"User management UI",
"Analytics dashboard"
],
"goal_id": "GOAL-20251103T143000"
}
Goal Context:
Process:
Output:
{
"alignment_score": 8,
"threshold": "RED",
"recommendation": "HALT",
"alert": "⚠️ Wave 2 misaligned with goal",
"action_items": [
"Wave 2 targets admin features, goal expects Payment Processing",
"Reorder: Move admin to later wave",
"OR: Update goal to prioritize admin before payments"
]
}
Input:
{
"mode": "detect-drift",
"goal_id": "GOAL-20251103T143000",
"conversation_context": [
"User: Add OAuth social login",
"User: Also need password reset",
"User: What about 2FA?"
]
}
Goal Context:
Process:
Output:
{
"drift_detected": true,
"expansion_ratio": 100,
"threshold": "HIGH",
"new_features": ["OAuth social login", "password reset", "2FA"],
"alert": "⚠️ Scope expanded by 100% (3 new features)",
"recommendation": "UPDATE_GOAL",
"action": "Add Advanced Auth milestone (20% weight)"
}
Input:
{
"mode": "quantify",
"goal_text": "Make the platform more performant",
"domain": "web-application"
}
Process:
Quantify "performant":
- Current response time: 500ms (p95)
- Target response time: ____ ms?
OR:
- Throughput: ____ requests/second?
Output:
{
"original_goal": "Make the platform more performant",
"quantified_goal": "Achieve p95 response time < 100ms with 10K req/s throughput",
"metrics": [
{
"term": "performant",
"metric": "p95_latency",
"target": 100,
"unit": "ms",
"test_method": "Load testing"
},
{
"term": "performant",
"metric": "throughput",
"target": 10000,
"unit": "req/s",
"test_method": "Performance profiling"
}
],
"success_criteria": "Load tests pass with p95 < 100ms at 10K req/s"
}
How to verify this skill worked correctly:
In SKILL.md (this file):
In references/ (for deep details):
references/ALIGNMENT_ALGORITHM.md: Complete similarity calculation detailsreferences/DRIFT_PATTERNS.md: Advanced drift detection patternsreferences/QUANTIFICATION_MAPPINGS.md: Qualitative→quantitative term mappingsshannon-plugin/core/PHASE_PLANNING.md@goal-management (REQUIRED), @wave-orchestration/shannon:wave (validates pre-wave), /shannon:north_star (validates goal changes)Skill Type: QUANTITATIVE - Follow alignment scoring algorithm exactly, no subjective adjustments Version: 4.0.0 Last Updated: 2025-11-04 Status: Core
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.