n-adr-normalize

Runs manual ADR draft normalization batches through an LLM hook script.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/nitra/7n-test --skill n-adr-normalize-nitra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-adr-normalize
Source: https://github.com/nitra/7n-test/tree/main/.cursor/skills/n-adr-normalize
Command: npx skills add https://github.com/nitra/7n-test --skill n-adr-normalize-nitra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? ADR draft files accumulate in docs/adr/ faster than the automatic Stop-hook threshold triggers cleanup, and LLM refusals or min-interval locks can delay normalization. This Skill lets you manually run one normalization batch on demand, bypassing the threshold and interval guards, and review the result via git diff before committing. ## Core Features & Use Cases - Manual batch execution: Runs .claude/hooks/normalize-decisions.sh with ADR_NORMALIZE_THRESHOLD=0 and ADR_NORMALIZE_MIN_INTERVAL_HOURS=0 to force a single batch through the LLM. - Dry-run preview: ADR_NORMALIZE_DRY=1 writes the planned operations to the log without touching any files. - Review and rollback workflow: Inspect delete/rewrite/merge-into operations with git status and git diff, then accept, selectively revert, or clean the whole batch. - Worktree isolation: Enforces a preflight that creates a dedicated git worktree (<current-branch>-adr-normal) so normalization never runs in the main tree or in parallel. - Use Case: You have 25 ADR drafts from recent sessions and want to clean the inbox now instead of waiting for the threshold — run the dry-run, check the log, execute the real batch, review the diff, and commit. ## Quick Start Ask the agent to run the n-adr-normalize skill to process one batch of ADR drafts in docs/adr/ and show the git diff of the results.

Frequently Asked Questions about n-adr-normalize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manually run ADR normalization before the threshold is reached?

Run the normalize-decisions.sh hook script with ADR_NORMALIZE_THRESHOLD=0 and ADR_NORMALIZE_MIN_INTERVAL_HOURS=0 to bypass both guards. This processes one batch of drafts (default 10, oldest first) through the LLM without committing anything.

How can I preview ADR normalization changes without modifying files?

Set ADR_NORMALIZE_DRY=1 when running the script. It writes the planned operations to .claude/hooks/normalize-decisions.log without changing any files, so you can inspect the plan with tail before a real run.

Why does the ADR normalize script exit immediately without logging?

Check whether ADR_NORMALIZE_RUNNING is set in the environment, which is the recursion guard, and whether the repository is in a merge or rebase state. Also confirm that claude or cursor-agent is available in PATH, otherwise the script exits silently.

Why are my ADR drafts being deleted silently during normalization?

This is the structural tooling-only skip, which discards drafts from sessions that only touched tooling files like .cspell.json, CHANGELOG.md, or version bumps. Confirm via the log by grepping for tooling-only, and set ADR_NORMALIZE_SKIP_TOOLING_ONLY=0 to disable it.

How do I revert unwanted ADR normalization changes?

The script never commits, so use git checkout -- docs/adr/ to revert modifications and git clean -f docs/adr/ to remove untracked rewrite results. For a single file, restore it and delete the new timestamped rewrite file manually.