---
name: erp-kit-score
description: Evaluate a consumer repo's adherence to erp-kit philosophy across four independent dimensions (template sync, repo structure, implementation thinness, version alignment). Use when the user asks "how erp-kit-aligned is this repo?", as a periodic health check, or before deciding to refactor. For forward-looking update recommendations use erp-kit-update-advisor instead.
metadata:
  erp-kit-version: "0.38.0"
---

# erp-kit Score Workflow

Evaluate a repo's **current state** against erp-kit philosophy across four independent dimensions and emit findings per dimension. The dimensions are **not aggregated into a single overall score** — they describe different concerns and are intended to be read side-by-side.

This skill is **not a strict drift checker** and **not a future-looking update advisor.** Scoring tolerates legitimate divergences (project-specific customizations, intentional dependency pinning, etc.). The goal is to surface whether the repo follows the spirit of erp-kit at the current point in time. For "should I update?" use [`erp-kit-update-advisor`](../erp-kit-update-advisor/SKILL.md).

## Output shape per dimension

| Dimension | Output type | What it means |
| --------- | ----------- | ------------- |
| Template sync | 0-100 score | continuous — degrees of drift acceptability |
| Repo structure | binary status (`ok` / `violations`) | pass / fail — naming and required-dirs either match the conventions or do not |
| Implementation thinness | 0-100 score | continuous — degrees of alignment with the thin-implementation principle |
| Version alignment | binary status (`ok` / `violations`) | pass / fail — workspace dependency declarations and installed skill versions either satisfy the contracts erp-kit ships or do not |

Structure and version alignment are intentionally binary: a missing `command/` directory or an out-of-range SDK pin is either correct or not — there is no "70% aligned". Templates and thinness are tolerant of legitimate divergence, so they need a continuous scale.

## When to Use

- User asks "how erp-kit-aligned is this repo?" or "score this codebase"
- As a periodic health check (quarterly, before releases, etc.)
- Before deciding to refactor a module / app

## Workflow

```
SETUP → DISPATCH DIMENSION AGENTS → REPORT (each dimension stands alone)
```

## Step 1: Setup

Define shared context:

- `REPO_ROOT`: argument or current working directory. Must contain a `package.json` and a `node_modules/@tailor-platform/erp-kit/` directory.
- `APP_ROOT` (optional): path to one app directory under `REPO_ROOT`
- `APPS_ROOT` (optional): path to the apps directory under `REPO_ROOT`
- `MODULES_ROOT` (optional): path to the modules directory under `REPO_ROOT`

If `@tailor-platform/erp-kit` is not a dependency, stop with: "erp-kit is not installed in this repo."

## Step 2: Dispatch Dimension Agents (parallel)

Four agents run in parallel:

| Agent | Prompt template | Inputs |
| ----- | --------------- | ------ |
| Templates | [references/dim-templates.md](references/dim-templates.md) | `REPO_ROOT` |
| Structure | [references/dim-structure.md](references/dim-structure.md) | `REPO_ROOT`, optional `APP_ROOT` and `MODULES_ROOT` |
| Thinness | [references/dim-thinness.md](references/dim-thinness.md) | `REPO_ROOT`, optional `APP_ROOT` and `MODULES_ROOT` |
| Versions | [references/dim-versions.md](references/dim-versions.md) | `REPO_ROOT`, optional `APPS_ROOT` and `MODULES_ROOT` |

Each agent returns structured JSON. Templates and Thinness return `{ score: 0-100, findings: [...] }`; Structure and Versions return `{ status: "ok" | "violations", findings: [...] }`. See [references/score-report-format.md](references/score-report-format.md) for the full shape.

## Step 3: Report

Emit each dimension's result independently — no weighting, no overall score. Follow the layout defined in [references/score-report-format.md](references/score-report-format.md):

- Summary table with the four dimensions side-by-side (score or status, plus headline finding count)
- Per-dimension section with full findings

The reader reads each dimension on its own merits; a "low template sync" repo can still have great thinness, and the score skill should make that obvious.
