Circle Suite: complete the ladder — every paid level now unlocks live software
Four new tools, so no tier is a placeholder any more: L4 Voice Profile (/suite/voice) — five short answers that ride along with every Copy Engine and Email Engine generation. It sits BEFORE the compliance block in the prompt on purpose: a personal voice must never be able to talk the model out of the honesty rules. suite-email builds its own prompt, so the profile is threaded in there separately or email would keep sounding generic while the Copy Engine sounded like the member. L5 Split Tester (/suite/split) — 2-3 variants launched as one test with the impressions split evenly, then click counters compared. Deliberately conservative: it will not declare a winner until both arms have real volume AND the leader is clearly ahead, because a 3-click gap on 400 impressions is noise. A genuine tie is reported as a tie, which is useful information too. A failed arm rolls back the whole test rather than leaving half of it running. Apex is the right home for it — that is where impressions jump to 50,000. L6 Funnel Factory (/suite/funnel) — extra named pages at /p/<id>/<slug>, so a leader can run one page per audience and point different ads at each. Missing slugs fall back to the member's main page, same no-dead-ends rule as /p/<id>. L7 Leader Ops (/suite/leader) — the coaching radar already existed in chain.js and only admin could see it, which was backwards: the leaders running those legs need it more than anyone. Now scoped to the member's own organisation, with a written plan built on contract-read facts only. Follows the teach-forward rule — the digest gives the leader words to hand down, not just numbers to act on. Tile copy across the wall and the payout alerts now describes what actually exists rather than what was sketched. suite-tools.js was stale in both directions (it still had the Traffic Desk at L5 and L3 not live). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+32
-4
@@ -14,10 +14,38 @@ const suiteAI = require('./suite-ai');
|
||||
let DATA_DIR = null;
|
||||
function init(opts) { DATA_DIR = opts.dataDir; }
|
||||
function dir() { const d = path.join(DATA_DIR, 'pages'); try { fs.mkdirSync(d, { recursive: true }); } catch (e) {} return d; }
|
||||
function file(id) { return path.join(dir(), String(id).replace(/\D/g, '') + '.json'); }
|
||||
// A member's main page is <id>.json and lives at /p/<id>. Level 6 adds extra
|
||||
// named pages, stored as <id>--<slug>.json and served at /p/<id>/<slug>, so a
|
||||
// leader can run a different page per angle and point different ads at each.
|
||||
function slugify(s) {
|
||||
return String(s || '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 24);
|
||||
}
|
||||
function file(id, slug) {
|
||||
const base = String(id).replace(/\D/g, '');
|
||||
const sl = slug ? slugify(slug) : '';
|
||||
return path.join(dir(), base + (sl ? '--' + sl : '') + '.json');
|
||||
}
|
||||
|
||||
function load(id) { try { return JSON.parse(fs.readFileSync(file(id), 'utf8')); } catch (e) { return null; } }
|
||||
function save(id, rec) { fs.writeFileSync(file(id), JSON.stringify(rec)); return rec; }
|
||||
function load(id, slug) { try { return JSON.parse(fs.readFileSync(file(id, slug), 'utf8')); } catch (e) { return null; } }
|
||||
function save(id, rec, slug) { fs.writeFileSync(file(id, slug), JSON.stringify(rec)); return rec; }
|
||||
function remove(id, slug) { if (!slug) return false; try { fs.unlinkSync(file(id, slug)); return true; } catch (e) { return false; } }
|
||||
|
||||
// Every page this member owns, main first.
|
||||
function list(id) {
|
||||
const base = String(id).replace(/\D/g, '');
|
||||
const out = [];
|
||||
const main = load(id);
|
||||
if (main && main.copy) out.push({ slug: '', url: '/p/' + base, name: main.name || 'Main page', angle: main.angle, updatedAt: main.updatedAt });
|
||||
let files = [];
|
||||
try { files = fs.readdirSync(dir()); } catch (e) { files = []; }
|
||||
files.forEach(function (f) {
|
||||
const m = f.match(new RegExp('^' + base + '--([a-z0-9-]+)\\.json$'));
|
||||
if (!m) return;
|
||||
const rec = load(id, m[1]);
|
||||
if (rec && rec.copy) out.push({ slug: m[1], url: '/p/' + base + '/' + m[1], name: rec.name || m[1], angle: rec.angle, updatedAt: rec.updatedAt });
|
||||
});
|
||||
return out;
|
||||
}
|
||||
|
||||
// Angles reuse the team's existing hook videos + their landing variant.
|
||||
const ANGLES = {
|
||||
@@ -138,4 +166,4 @@ function render(rec) {
|
||||
'</body></html>';
|
||||
}
|
||||
|
||||
module.exports = { init, load, save, generate, render, ANGLES, parseSections };
|
||||
module.exports = { init, load, save, remove, list, slugify, generate, render, ANGLES, parseSections };
|
||||
|
||||
Reference in New Issue
Block a user