VIRIM Infotech
Your AI Assisted Product Developers

vm-skeleton-feasibility-checker

Skill detail with category, linked agents, and source metadata.

vm-skeleton-feasibility-checker

Validation script that runs 7 checks against a sampled set of source files to determine whether skeleton-based summarization is safe for the target codebase. Checks for business logic in JSX attributes, dynamic dispatch, HOC depth, event-bus usage, chain density, config-driven rules, and skeleton regex coverage. Writes intermediate/skeleton-feasibility.json with per-check pass/warn/fail and overall recommendation.

Category: compliance Used by 1 agents

Source: .github/skills/compliance/vm-skeleton-feasibility-checker/SKILL.md

Used By Agents

Preview

View source preview (first 3000 chars)

# vm-skeleton-feasibility-checker

## When to Use This Skill

- During Phase 1 of the RE pipeline, after discovery but before Phase 4a-SKEL
- When deciding whether to use skeleton-based summarization vs full-file AI reads
- When onboarding a new codebase to the RE pipeline for the first time

## Unitary Function

**ONE responsibility:** Sample source files, run 7 validation checks, determine if skeleton-based summarization is safe for this codebase.

## NOT RESPONSIBLE FOR

- Extracting skeletons (that is vm-skeleton-extractor)
- Summarizing files (that is 3b File Summarizer)
- Any modification to the codebase

## Checks and Thresholds

| # | Check | What It Tests | Pass Threshold |
|---|---|---|---|
| 1 | Business logic in JSX attrs | Ternaries with business terms in JSX attribute values | <5% of JSX attrs |
| 2 | Dynamic dispatch | Computed property calls like `obj[variable]()` | <2% of call lines |
| 3 | HOC wrapping depth | Components exported through 3+ nested HOCs | <15% of exports |
| 4 | Implicit event flow | PubSub/EventEmitter/custom events for cross-file communication | <20% of files |
| 5 | Multi-line chains | 5+ line method chains (`.then().then().catch()`) | <3 per file avg |
| 6 | Config-driven rules | Business rules in lookup tables/config objects | <50 lines total |
| 7 | Skeleton logic coverage | % of logic lines captured by skeleton regex | >=85% |

## Gate Behavior

- **All PASS:** `skeleton_mode: true` for all file categories
- **Check 1 FAIL:** Fall back to full-file reads for component files (role_tag: controller, entry, component)
- **Check 2 or 3 FAIL:** Fall back to full-file reads for files with HOC exports
- **Check 4 FAIL:** Fall back to full-file reads for files importing PubSub/EventEmitter
- **Check 7 FAIL:** Fall back to full-file reads for all files (skeleton regex insufficient)

## Input

```json
{
  "repo_path": "/absolute/path/to/repo",
  "output_dir": "docs/codebase-analysis",
  "sample_size": 80,
  "random_seed": 42
}
```

## Script

See `scripts/feasibility_checker.py`. Cross-platform Python, no external dependencies.

## Output Schema

```json
{
  "generated_by": {"agent": "vm-skeleton-feasibility-checker", "version": "1.0.0"},
  "checks": {
    "check1_business_logic_in_jsx": {
      "description": "...",
      "total_scanned": 593,
      "flagged": 21,
      "percentage": 3.5,
      "threshold": 5.0,
      "status": "PASS",
      "examples": [],
      "implication": "..."
    }
  },
  "overall": {
    "pass_count": 7,
    "warn_count": 0,
    "fail_count": 0,
    "recommendation": "skeleton_safe",
    "failed_checks": [],
    "fallback_categories": []
  }
}
```