affaan-m/ECC · error · Error

is out of date; run npm run command-registry:write

Error message

${normalizePath(path.relative(ROOT, outputPath))} is out of date; run npm run command-registry:write

What it means

checkRegistry throws when the generated registry differs byte-for-byte from the file on disk, i.e. the committed command-registry artifact is stale relative to current commands/agents/skills. It is a drift detector, not a corruption error.

Solutions

  1. Run `npm run command-registry:write` to regenerate and commit the updated registry.
  2. If the diff is unexpected, inspect recent command/agent/skill changes for accidental registry entries.
  3. Re-run check mode to confirm the registry matches before committing.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/ci/generate-command-registry.js:227 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/fb1981aa068c401b. Report an issue: GitHub.

Appendix: source

Thrown at scripts/ci/generate-command-registry.js:227

}

function writeRegistry(registry, outputPath = DEFAULT_OUTPUT_PATH) {
  fs.mkdirSync(path.dirname(outputPath), { recursive: true });
  fs.writeFileSync(outputPath, formatRegistry(registry), 'utf8');
}

function checkRegistry(registry, outputPath = DEFAULT_OUTPUT_PATH) {
  const expected = formatRegistry(registry);
  let current;

  try {
    current = fs.readFileSync(outputPath, 'utf8');
  } catch (error) {
    throw new Error(`Failed to read ${normalizePath(path.relative(ROOT, outputPath))}: ${error.message}`);
  }

  if (current !== expected) {
    throw new Error(`${normalizePath(path.relative(ROOT, outputPath))} is out of date; run npm run command-registry:write`);
  }
}

function formatTextSummary(registry) {
  const lines = [
    'Command registry statistics',
    '',
    `Total commands: ${registry.totalCommands}`,
    '',
    'By type:',
  ];

  for (const [type, count] of Object.entries(registry.statistics.byType)) {
    lines.push(`  ${type}: ${count}`);
  }

  lines.push('', 'Top agents:');
  for (const { agent, count } of registry.statistics.topAgents) {

View on GitHub (pinned to 8321021c54)