check
Check cross-artifact consistency — reference integrity, orphans, contradictions
Shared partial: append a scoring snapshot to .claude/nlpm-history.json. Used by /nlpm:init, /nlpm:score, and /nlpm:trend so trend data accumulates without manual upkeep.
> /plugin marketplace add xiaolai/nlpm > /plugin install nlpm@xiaolai
How it fires
How this command gets triggered: by you, by Claude, or both.
/append-historyContext preview
What this command does when you run it.
Shared partial: append a scoring snapshot to .claude/nlpm-history.json. Used by /nlpm:init, /nlpm:score, and /nlpm:trend so trend data accumulates without manual upkeep.
description: "Shared partial: append a scoring snapshot to .claude/nlpm-history.json. Used by /nlpm:init, /nlpm:score, and /nlpm:trend so trend data accumulates without manual upkeep." user-invocable: false disable-model-invocation: true
**Purpose:** Persist a scoring result to `.claude/nlpm-history.json` so `/nlpm:trend` has data to compare against.
**Input:** the scoring result the caller just produced (per-file scores + overall average), plus a scope marker. **Output:** updated `.claude/nlpm-history.json` with one new snapshot appended.
`.claude/nlpm-history.json` lives at the project root.
{
"snapshots": [
{
"timestamp": "2026-05-19T07:00:00Z",
"overall": 85,
"files": {
"agents/scorer.md": { "score": 92, "type": "agent" },
"commands/score.md": { "score": 95, "type": "command" }
},
"scope": "full",
"files_scored": 23
}
]
}Every snapshot MUST carry a `scope` string. `/nlpm:trend` filters by scope so the overall trend line stays apples-to-apples (a partial scan should not look like an overall score regression).
| Caller | `scope` value | Meaning | |--------|--------------|---------| | `/nlpm:init` (baseline) | `"full"` | First-run scan of the entire project | | `/nlpm:score` (no args) | `"full"` | Full-repo scoring pass | | `/nlpm:score <path>` | `"path:<path>"` | Path-bound scan, e.g. `"path:agents/"` | | `/nlpm:score <single-file>` | `"path:<file>"` | Single-file scan, e.g. `"path:agents/scorer.md"` | | `/nlpm:score --changed` | `"changed"` | Git-changed-files scan | | `/nlpm:trend [path]` | inherit from the caller's scope decision above | `/nlpm:trend` dispatches its own scoring pass; the scope follows the same rules as `/nlpm:score` with the same args |
1. **Compute overall.** If the caller scored N files, `overall` is the integer-rounded arithmetic mean of their scores. If `files_scored == 0`, skip the append entirely — empty snapshots add noise.
2. **Read existing history.** Try to read `.claude/nlpm-history.json`. If it doesn't exist or doesn't parse as JSON, treat as `{"snapshots": []}` (recoverable, not an error).
3. **Build the new snapshot.**
{
"timestamp": "<ISO 8601 UTC, second precision, e.g. 2026-05-19T07:00:00Z>",
"overall": <int>,
"files": { "<path>": { "score": <int>, "type": "<artifact-type>" }, ... },
"scope": "<see table above>",
"files_scored": <int>
}4. **Deduplicate trivial repeats.** If the most recent snapshot in `snapshots` has the same `scope` AND the same per-file scores (compare the `files` map), do NOT append — just update the existing snapshot's `timestamp`. This keeps the history clean when a developer runs `/nlpm:score` multiple times without making changes.
5. **Append.** Add the snapshot to the end of the `snapshots` array.
6. **Write atomically.** Write the JSON to `.claude/nlpm-history.json.tmp` first, then rename to the final path. Use 2-space indentation, terminate with a newline.
7. **Create parent dirs.** If `.claude/` doesn't exist, create it (this matters when `/nlpm:init` runs the very first time).
Natural-Language Programming Manager — score, check, fix, and test NL artifacts across Claude Code, Codex CLI, and Antigravity. Tier-aware scoring with per-tool overlays. Part of the xiaolai plugin marketplace.
Check cross-artifact consistency — reference integrity, orphans, contradictions
Auto-fix fixable findings in NL artifacts — missing fields, heading gaps, field renames
Prepare NLPM for this project — detect artifacts, set strictness, capture baseline trend snapshot
Discover all natural language programming artifacts in a repository
Render a self-contained HTML report — per-file scores, score trend, cross-artifact graph, vocabulary noun-verb map, drift…
Score NL programming artifacts — 100-point quality score per file