Context
Per Memo 059 Phase 4 PRD-018, the dot-github profile generator must source schema stats (count_schemas, count_unique_datasources, count_tools, count_resources, count_skills) from the flowmcp-spec payload's meta.stats block — NOT directly from flowmcp-schemas-public. This keeps the spec payload as the Single-Source-of-Truth for downstream consumers.
Scope
- Extend
scripts/fetch-refs.mjs to also fetch generated/docs-payload/manifest.json from flowmcp-spec and merge meta.stats into refs.json under a stats key
- Extend
src/lib/placeholder-replace.mjs regex to recognize {{stats.*}} placeholders
- Null fallback: render
— instead of crashing when stats value is null (handles spec-payload null block)
- Update
src/data/template.txt: replace hardcoded "530+ curated API schemas" with dynamic {{stats.count_schemas}} etc.
- Build fail-safe: manifest fetch failures fall back to null block, BadgeTable still renders
Acceptance
- No direct fetch from flowmcp-schemas-public (verified via grep — only badge-config references remain)
npm run fetch-refs && npm start succeeds with null stats (current state: upstream manifest pre-PRD-016)
- Happy path tested locally with injected stats (365 schemas, 288 datasources, 1575 tools)
- Build never crashes on null stats
Reference
Context
Per Memo 059 Phase 4 PRD-018, the dot-github profile generator must source schema stats (count_schemas, count_unique_datasources, count_tools, count_resources, count_skills) from the flowmcp-spec payload's
meta.statsblock — NOT directly from flowmcp-schemas-public. This keeps the spec payload as the Single-Source-of-Truth for downstream consumers.Scope
scripts/fetch-refs.mjsto also fetchgenerated/docs-payload/manifest.jsonfrom flowmcp-spec and mergemeta.statsinto refs.json under astatskeysrc/lib/placeholder-replace.mjsregex to recognize{{stats.*}}placeholders—instead of crashing when stats value is null (handles spec-payload null block)src/data/template.txt: replace hardcoded "530+ curated API schemas" with dynamic{{stats.count_schemas}}etc.Acceptance
npm run fetch-refs && npm startsucceeds with null stats (current state: upstream manifest pre-PRD-016)Reference