{"record":{"id":"42b1812f9d93c51e","repo":"affaan-m/ECC","slug":"docs-zh-cn-readme-md-is-missing-the-quick-start-ca","errorCode":null,"errorMessage":"docs/zh-CN/README.md is missing the quick-start catalog summary","messagePattern":"docs/zh-CN/README\\.md is missing the quick-start catalog summary","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/catalog.js","lineNumber":157,"sourceCode":"function parseZhRootReadmeExpectations(readmeContent) {\n  const match = readmeContent.match(/你现在可以使用\\s+(\\d+)\\s+个代理、\\s*(\\d+)\\s*个技能和\\s*(\\d+)\\s*个命令/i);\n  if (!match) {\n    throw new Error('README.zh-CN.md is missing the quick-start catalog summary');\n  }\n\n  return [\n    { category: 'agents', mode: 'exact', expected: Number(match[1]), source: 'README.zh-CN.md quick-start summary' },\n    { category: 'skills', mode: 'exact', expected: Number(match[2]), source: 'README.zh-CN.md quick-start summary' },\n    { category: 'commands', mode: 'exact', expected: Number(match[3]), source: 'README.zh-CN.md quick-start summary' }\n  ];\n}\n\nfunction parseZhDocsReadmeExpectations(readmeContent) {\n  const expectations = [];\n\n  const quickStartMatch = readmeContent.match(/你现在可以使用\\s+(\\d+)\\s+个智能体、\\s*(\\d+)\\s*项技能和\\s*(\\d+)\\s*个命令了/i);\n  if (!quickStartMatch) {\n    throw new Error('docs/zh-CN/README.md is missing the quick-start catalog summary');\n  }\n\n  expectations.push(\n    { category: 'agents', mode: 'exact', expected: Number(quickStartMatch[1]), source: 'docs/zh-CN/README.md quick-start summary' },\n    { category: 'skills', mode: 'exact', expected: Number(quickStartMatch[2]), source: 'docs/zh-CN/README.md quick-start summary' },\n    { category: 'commands', mode: 'exact', expected: Number(quickStartMatch[3]), source: 'docs/zh-CN/README.md quick-start summary' }\n  );\n\n  const tablePatterns = [\n    { category: 'agents', regex: /\\|\\s*智能体\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s*个\\s*\\|/i, source: 'docs/zh-CN/README.md comparison table' },\n    { category: 'commands', regex: /\\|\\s*命令\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s*个\\s*\\|/i, source: 'docs/zh-CN/README.md comparison table' },\n    { category: 'skills', regex: /\\|\\s*技能\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s*项\\s*\\|/i, source: 'docs/zh-CN/README.md comparison table' }\n  ];\n\n  for (const pattern of tablePatterns) {\n    const match = readmeContent.match(pattern.regex);\n    if (!match) {\n      throw new Error(`${pattern.source} is missing the ${pattern.category} row`);","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/ci/catalog.js#L139-L175","documentation":"`parseZhDocsReadmeExpectations` reads `docs/zh-CN/README.md` and matches `/你现在可以使用\\s+(\\d+)\\s+个智能体、\\s*(\\d+)\\s*项技能和\\s*(\\d+)\\s*个命令了/i`. Note this regex intentionally differs from the root README.zh-CN.md one: it requires 智能体 (not 代理), 项 (not 个) for skills, and the sentence-final 了 particle. The throw fires when this exact sentence is missing.","triggerScenarios":"Triggered when `docs/zh-CN/README.md` is missing or has altered the sentence `你现在可以使用 N 个智能体、 N 项技能和 N 个命令了`. Drift in any of the three distinguishing tokens (智能体, 项技能, 了) or the punctuation (、/和) causes a match failure.","commonSituations":"A copyeditor removes the 了 particle for conciseness. Someone normalizes the docs/zh-CN copy to match the root README.zh-CN.md wording (代理/个), breaking this stricter regex. The skills counter word is changed from 项 to 个. A translation refresh restructures the quick-start paragraph.","solutions":["Restore the exact sentence in docs/zh-CN/README.md: `你现在可以使用 N 个智能体、 N 项技能和 N 个命令了` with current counts.","Keep the three distinguishing tokens intact: 智能体 (not 代理), 项 (not 个) for skills, and the trailing 了.","Run `node scripts/ci/catalog.js --write` to regenerate all documented counts from the catalog.","Cross-check against README.zh-CN.md to confirm the two files intentionally use different vocabulary."],"exampleFix":"// before (docs/zh-CN/README.md, 了 dropped and 项→个)\n你现在可以使用 68 个智能体、284 个技能和 94 个命令\n\n// after\n你现在可以使用 68 个智能体、284 项技能和 94 个命令了","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst readme = fs.readFileSync('docs/zh-CN/README.md', 'utf8');\nconst re = /你现在可以使用\\s+(\\d+)\\s+个智能体、\\s*(\\d+)\\s*项技能和\\s*(\\d+)\\s*个命令了/i;\nif (!re.test(readme)) {\n  console.error('docs/zh-CN/README.md missing quick-start summary.');\n  console.error('Expected: 你现在可以使用 N 个智能体、 N 项技能和 N 个命令了');\n  console.error('Required distinguishing tokens: 智能体 (not 代理), 项 (not 个) for skills, trailing 了.');\n  process.exit(1);\n}","typeGuard":"function hasZhDocsQuickStart(readmeContent) {\n  return /你现在可以使用\\s+(\\d+)\\s+个智能体、\\s*(\\d+)\\s*项技能和\\s*(\\d+)\\s*个命令了/i.test(readmeContent);\n}","tryCatchPattern":"try {\n  runCatalogCheck();\n} catch (error) {\n  if (/docs\\/zh-CN\\/README\\.md is missing the quick-start/i.test(error.message)) {\n    console.error('Restore: 你现在可以使用 N 个智能体、 N 项技能和 N 个命令了');\n  }\n  throw error;\n}","preventionTips":["docs/zh-CN requires 智能体/项/了 — do not normalize toward the root README.zh-CN.md wording.","Keep the trailing 了 particle; removing it breaks the regex.","Run `--write` to sync counts.","Cross-check both Chinese READMEs after translation passes."],"tags":["catalog","ci","regex","i18n","chinese","readme","documentation-drift"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}