Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

1.5 KB
Raw Blame
#!/usr/bin/env node
// Strip docs/agent-abilities/FULL-ARTICLE.md down to plain headings + text:
// no dash subtitles on headings, no bold explainer labels ("How it works:",
// "Why it matters:", "Under the hood.", "Guardrails."), no blockquote
// taglines, no production shot-list bullets. Source file is never modified.
//   node scripts/simplify-abilities.mjs
import { readFileSync, writeFileSync } from 'node:fs';

const SRC = 'docs/agent-abilities/FULL-ARTICLE.md';
const OUT = 'docs/agent-abilities/ABILITIES.md';

const LABELS = [
  /^\*\*How it works:\*\*\s*/,
  /^\*\*Why it matters:\*\*\s*/,
  /^\*\*Under the hood\.\*\*\s*/,
  /^\*\*Guardrails\.\*\*\s*/,
];

const lines = readFileSync(SRC, 'utf8').split('\n');
const out = [];

for (let line of lines) {
  if (line.startsWith('<!--')) continue; // generator comment
  if (line.startsWith('> ')) continue; // blockquote tagline
  if (line.startsWith('- ')) continue; // production shot-list bullets

  if (line.startsWith('# ') || line.startsWith('## ')) {
    line = line.replace(/\s+—\s+.*$/, ''); // drop " — decorative subtitle"
  }

  for (const re of LABELS) {
    if (re.test(line)) {
      line = line.replace(re, '');
      break;
    }
  }

  out.push(line);
}

const body = out.join('\n').replace(/\n{3,}/g, '\n\n').trim();

const header = `<!-- GENERATED by scripts/simplify-abilities.mjs from FULL-ARTICLE.md — do not edit by hand. Edit FULL-ARTICLE.md and re-run. -->\n\n`;
writeFileSync(OUT, header + body + '\n');
console.log(`Wrote ${OUT}`);