Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

docs(img): the lifecycle figure wraps a long move list

Corey Olsonee9dbfee1e6a
diff --git a/docs/img/draw.mjs b/docs/img/draw.mjs
index 5878a17a..377a6b67 100644
--- a/docs/img/draw.mjs
+++ b/docs/img/draw.mjs
@@ -98,6 +98,24 @@ function figure({ width, height, title, desc, body }) {
*/
const text = (x, y, words, cls, anchor = 'start') => `<text class="${cls}" x="${x}" y="${y}"${anchor === 'start' ? '' : ` text-anchor="${anchor}"`}>${esc(words)}</text>`;
+/**
+ * Split a ' · ' list too wide for a box of width `w` into two lines, filling the first; one line otherwise.
+ * Why: a state that keeps several moves (↻ release · escalate · refreeze) outgrew its box and the card.
+ *
+ * @param {string} sub
+ * @param {number} w
+ * @returns {string[]}
+ */
+function wrapList(sub, w) {
+ const fits = Math.floor((w - 16) / (12 * 0.56));
+ const parts = sub.split(' · ');
+ if (sub.length <= fits || parts.length < 2) return [sub];
+ let first = parts[0];
+ let used = 1;
+ while (used < parts.length - 1 && `${first} · ${parts[used]}`.length <= fits) first = `${first} · ${parts[used++]}`;
+ return [first, parts.slice(used).join(' · ')];
+}
+
/**
* A box with a title and an optional second line, centred. A stack draws two cards behind it, for
* work several agents do at once; `final` draws a second border inside, for a state nothing leaves.
@@ -109,9 +127,12 @@ function box({ x, y, w, h, kind, title, sub, mono = false, stack = false, final
const cx = x + w / 2;
const behind = stack ? [10, 5].map((d) => `<rect x="${x + d}" y="${y - d}" width="${w}" height="${h}" rx="8"/>`).join('') : '';
const inner = final ? `<rect x="${x + 4}" y="${y + 4}" width="${w - 8}" height="${h - 8}" rx="5" fill="none"/>` : '';
- const lines = sub
- ? [text(cx, y + h / 2 - 4, title, `t1${mono ? ' mono' : ''}`, 'middle'), text(cx, y + h / 2 + 14, sub, 't2', 'middle')]
- : [text(cx, y + h / 2 + 5, title, `t1${mono ? ' mono' : ''}`, 'middle')];
+ const subs = sub ? wrapList(sub, w) : [];
+ const lines = subs.length === 2
+ ? [text(cx, y + h / 2 - 8, title, `t1${mono ? ' mono' : ''}`, 'middle'), text(cx, y + h / 2 + 8, subs[0], 't2', 'middle'), text(cx, y + h / 2 + 22, subs[1], 't2', 'middle')]
+ : sub
+ ? [text(cx, y + h / 2 - 4, title, `t1${mono ? ' mono' : ''}`, 'middle'), text(cx, y + h / 2 + 14, sub, 't2', 'middle')]
+ : [text(cx, y + h / 2 + 5, title, `t1${mono ? ' mono' : ''}`, 'middle')];
return `<g class="${kind}"${final ? ` data-final="${esc(final)}"` : ''}>${behind}<rect x="${x}" y="${y}" width="${w}" height="${h}" rx="8"/>${inner}${lines.join('')}</g>`;
}
diff --git a/docs/img/lifecycle-dark.svg b/docs/img/lifecycle-dark.svg
index 57bfce1b..3087bd40 100644
--- a/docs/img/lifecycle-dark.svg
+++ b/docs/img/lifecycle-dark.svg
@@ -53,7 +53,7 @@ text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans',
<rect class="card" x="0.5" y="0.5" width="839" height="391" rx="12"/>
<text class="head" x="24" y="34">An item's life</text>
<text class="aside" x="140" y="34">starts open; ends withdrawn</text>
-<g class="plain"><rect x="25" y="150" width="160" height="58" rx="8"/><text class="t1" x="105" y="175" text-anchor="middle">open</text><text class="t2" x="105" y="193" text-anchor="middle">↻ escalate · refreeze</text></g>
+<g class="plain"><rect x="25" y="150" width="160" height="58" rx="8"/><text class="t1" x="105" y="171" text-anchor="middle">open</text><text class="t2" x="105" y="187" text-anchor="middle">↻ release · escalate</text><text class="t2" x="105" y="201" text-anchor="middle">refreeze</text></g>
<g class="plain"><rect x="235" y="150" width="160" height="58" rx="8"/><text class="t1" x="315" y="175" text-anchor="middle">claimed</text><text class="t2" x="315" y="193" text-anchor="middle">↻ claim · refreeze</text></g>
<g class="plain"><rect x="445" y="150" width="160" height="58" rx="8"/><text class="t1" x="525" y="175" text-anchor="middle">submitted</text><text class="t2" x="525" y="193" text-anchor="middle">↻ reserve</text></g>
<g class="done"><rect x="655" y="150" width="160" height="58" rx="8"/><text class="t1" x="735" y="175" text-anchor="middle">verified</text><text class="t2" x="735" y="193" text-anchor="middle">↻ accept</text></g>
diff --git a/docs/img/lifecycle.svg b/docs/img/lifecycle.svg
index 60c3ee9a..2f612c65 100644
--- a/docs/img/lifecycle.svg
+++ b/docs/img/lifecycle.svg
@@ -35,7 +35,7 @@ text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans',
<rect class="card" x="0.5" y="0.5" width="839" height="391" rx="12"/>
<text class="head" x="24" y="34">An item's life</text>
<text class="aside" x="140" y="34">starts open; ends withdrawn</text>
-<g class="plain"><rect x="25" y="150" width="160" height="58" rx="8"/><text class="t1" x="105" y="175" text-anchor="middle">open</text><text class="t2" x="105" y="193" text-anchor="middle">↻ escalate · refreeze</text></g>
+<g class="plain"><rect x="25" y="150" width="160" height="58" rx="8"/><text class="t1" x="105" y="171" text-anchor="middle">open</text><text class="t2" x="105" y="187" text-anchor="middle">↻ release · escalate</text><text class="t2" x="105" y="201" text-anchor="middle">refreeze</text></g>
<g class="plain"><rect x="235" y="150" width="160" height="58" rx="8"/><text class="t1" x="315" y="175" text-anchor="middle">claimed</text><text class="t2" x="315" y="193" text-anchor="middle">↻ claim · refreeze</text></g>
<g class="plain"><rect x="445" y="150" width="160" height="58" rx="8"/><text class="t1" x="525" y="175" text-anchor="middle">submitted</text><text class="t2" x="525" y="193" text-anchor="middle">↻ reserve</text></g>
<g class="done"><rect x="655" y="150" width="160" height="58" rx="8"/><text class="t1" x="735" y="175" text-anchor="middle">verified</text><text class="t2" x="735" y="193" text-anchor="middle">↻ accept</text></g>