affaan-m/ECC · error · Error

README.zh-CN.md is missing the quick-start catalog summary

Error message

README.zh-CN.md is missing the quick-start catalog summary

What it means

`parseZhRootReadmeExpectations` extracts the quick-start summary sentence from the Chinese root README (`README.zh-CN.md`). It matches `/你现在可以使用\s+(\d+)\s+个代理、\s*(\d+)\s*个技能和\s*(\d+)\s*个命令/i`. The throw fires when that single sentence is absent or its wording has drifted. The three captured digits are the documented agents/skills/commands counts validated against the real catalog.

Source

Thrown at scripts/ci/catalog.js:142

    if (!match) {
      throw new Error(`${pattern.source} is missing the ${pattern.category} row`);
    }

    expectations.push({
      category: pattern.category,
      mode: 'exact',
      expected: Number(match[1]),
      source: `${pattern.source} (${pattern.category})`
    });
  }

  return expectations;
}

function parseZhRootReadmeExpectations(readmeContent) {
  const match = readmeContent.match(/你现在可以使用\s+(\d+)\s+个代理、\s*(\d+)\s*个技能和\s*(\d+)\s*个命令/i);
  if (!match) {
    throw new Error('README.zh-CN.md is missing the quick-start catalog summary');
  }

  return [
    { category: 'agents', mode: 'exact', expected: Number(match[1]), source: 'README.zh-CN.md quick-start summary' },
    { category: 'skills', mode: 'exact', expected: Number(match[2]), source: 'README.zh-CN.md quick-start summary' },
    { category: 'commands', mode: 'exact', expected: Number(match[3]), source: 'README.zh-CN.md quick-start summary' }
  ];
}

function parseZhDocsReadmeExpectations(readmeContent) {
  const expectations = [];

  const quickStartMatch = readmeContent.match(/你现在可以使用\s+(\d+)\s+个智能体、\s*(\d+)\s*项技能和\s*(\d+)\s*个命令了/i);
  if (!quickStartMatch) {
    throw new Error('docs/zh-CN/README.md is missing the quick-start catalog summary');
  }

  expectations.push(

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Restore the exact sentence in README.zh-CN.md: `你现在可以使用 N 个代理、 N 个技能和 N 个命令` with N matching the live catalog counts.
  2. Note this file uses 代理/个技能/个命令 — distinct from docs/zh-CN/README.md which uses 智能体/项技能/个命令了. Keep the two files' wording separate.
  3. Run `node scripts/ci/catalog.js --write` to auto-sync all counts from the filesystem catalog.
  4. Verify the `、` (ideographic comma) after 代理 and `和` before 命令 are present.

Example fix

// before (README.zh-CN.md, wording drifted to 智能体)
你现在可以使用 68 个智能体、284 项技能和 94 个命令

// after (root zh-CN uses 代理/个/个)
你现在可以使用 68 个代理、284 个技能和 94 个命令
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs');
const readme = fs.readFileSync('README.zh-CN.md', 'utf8');
const re = /你现在可以使用\s+(\d+)\s+个代理、\s*(\d+)\s*个技能和\s*(\d+)\s*个命令/i;
if (!re.test(readme)) {
  console.error('README.zh-CN.md missing quick-start summary sentence.');
  console.error('Expected: 你现在可以使用 N 个代理、 N 个技能和 N 个命令');
  console.error('Note: root zh-CN uses 代理/个技能/个命令 (distinct from docs/zh-CN which uses 智能体/项/了).');
  process.exit(1);
}

Type guard

function hasZhRootQuickStart(readmeContent) {
  return /你现在可以使用\s+(\d+)\s+个代理、\s*(\d+)\s*个技能和\s*(\d+)\s*个命令/i.test(readmeContent);
}

Try / catch

try {
  runCatalogCheck();
} catch (error) {
  if (/README\.zh-CN\.md is missing the quick-start/i.test(error.message)) {
    console.error('Restore: 你现在可以使用 N 个代理、 N 个技能和 N 个命令 (root zh-CN wording).');
  }
  throw error;
}

Prevention

When it happens

Trigger: Fires when running the catalog check against a `README.zh-CN.md` that lacks the exact sentence `你现在可以使用 N 个代理、 N 个技能和 N 个命令`. Common triggers: the sentence was paraphrased (e.g. 智能体 instead of 代理, or 项技能 instead of 个技能), the `、`/`和` conjunction punctuation changed, or the quick-start block was rewritten.

Common situations: A translator updates the Chinese README and swaps 代理 → 智能体 for consistency with `docs/zh-CN/README.md` (which uses 智能体), breaking this regex. Counts are edited but the surrounding wording is also altered. A merge resolves a conflict by deleting the sentence.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/dbc5edf593acdb27. Report an issue: GitHub.