a81a450e7e
Merged into tinqs/studio: - cmd/tinqs-cli/ — tinqs-cli (Go binary, from bot/cli) - cmd/tea/ — Gitea CLI tool (from tinqs/cli-tea) - services/bot/ — Bot service (from tinqs-ltd/bot on git.arikigame.com) - services/admin/ — Admin panel (from tinqs/admin) - services/team-tool/ — Team Tool (from tinqs/team-tool) - services/proxy/ — tinqs-proxy (from bot/proxy) - web/landing/ — tinqs.com website (from tinqs/website) - web/docs/ — Platform docs (from tinqs/docs) - web/blog/ — Blog (placeholder) - runner/ — Ephemeral CI runner (from tinqs/runner) All source repos will be deleted after verification.
49 lines
1.5 KiB
TypeScript
49 lines
1.5 KiB
TypeScript
/**
|
|
* Handoff markdown parsing — pure helpers.
|
|
* Run: npx tsx --test __tests__/handoffs.test.ts
|
|
*/
|
|
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import { extractBoldField, parseHandoffMarkdown, handoffGitStudioUrl, handoffSlug } from "../lib/handoffs";
|
|
|
|
const sample = `# Handoff: Game Caster AI Model Plan — May 2026
|
|
|
|
**From:** Ozan (Forge)
|
|
**To:** Can Gunaslan (Maul)
|
|
**Date:** 2026-05-14
|
|
**Status:** Open — needs Can's input
|
|
|
|
---
|
|
|
|
## Summary
|
|
|
|
Deep-dive audit of every AI model currently in Game Caster's stack.
|
|
|
|
---
|
|
|
|
## 1. Current Stack
|
|
`;
|
|
|
|
test("extractBoldField reads From / Status / Date", () => {
|
|
assert.equal(extractBoldField(sample, "From"), "Ozan (Forge)");
|
|
assert.equal(extractBoldField(sample, "To"), "Can Gunaslan (Maul)");
|
|
assert.equal(extractBoldField(sample, "Date"), "2026-05-14");
|
|
assert.ok(extractBoldField(sample, "Status").startsWith("Open"));
|
|
});
|
|
|
|
test("parseHandoffMarkdown returns title and summary", () => {
|
|
const p = parseHandoffMarkdown(sample, "game-caster-ai-plan-2026-05-14.md");
|
|
assert.ok(p.title.includes("Game Caster AI Model Plan"));
|
|
assert.ok(p.summary.includes("Deep-dive"));
|
|
});
|
|
|
|
test("handoffGitStudioUrl encodes path", () => {
|
|
const u = handoffGitStudioUrl("foo-bar.md");
|
|
assert.ok(u.includes("ai%2Fhandoffs%2Ffoo-bar.md") || u.includes("ai/handoffs"));
|
|
});
|
|
|
|
test("handoffSlug strips extension", () => {
|
|
assert.equal(handoffSlug("weekly-standup-2026-05-14.md"), "weekly-standup-2026-05-14");
|
|
});
|