Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/daemon/src/plugins/atoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export interface AtomCatalogEntry {
}

export const FIRST_PARTY_ATOMS: ReadonlyArray<AtomCatalogEntry> = [
{ id: 'discovery-question-form', label: 'Discovery question form', description: 'Turn-1 question form for ambiguous briefs.', status: 'implemented', taskKinds: ['new-generation', 'tune-collab'] },
{ id: 'direction-picker', label: 'Direction picker', description: '3-5 direction picker before final.', status: 'implemented', taskKinds: ['new-generation', 'tune-collab'] },
{ id: 'discovery-question-form', label: 'Discovery question form', description: 'Structured clarification for unresolved material requirements.', status: 'implemented', taskKinds: ['new-generation', 'tune-collab'] },
{ id: 'direction-picker', label: 'Direction picker', description: 'Optional 3-5 directions when explicitly requested.', status: 'implemented', taskKinds: ['new-generation', 'tune-collab'] },
{ id: 'todo-write', label: 'Todo write', description: 'TodoWrite-driven plan.', status: 'implemented', taskKinds: ['new-generation', 'code-migration', 'figma-migration', 'tune-collab'] },
{ id: 'file-read', label: 'File read', description: 'Read project files.', status: 'implemented', taskKinds: ['new-generation', 'code-migration', 'figma-migration', 'tune-collab'] },
{ id: 'file-write', label: 'File write', description: 'Write project files.', status: 'implemented', taskKinds: ['new-generation', 'code-migration', 'figma-migration', 'tune-collab'] },
Expand Down
432 changes: 320 additions & 112 deletions apps/daemon/src/prompts/core-slim.ts

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions apps/daemon/src/prompts/deck-framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,25 @@ Rules — same weight as the density rules above:
- ❌ Don't nest value labels inside a clipping fixed-height bar.
- ❌ Don't omit any data point's label, however short its bar.

## Nested / concentric diagram discipline

Nested shapes may share a center; their text blocks may not. Treat geometry and labels as separate layout responsibilities.

- Put at most one short KPI in the shared center. Never center a label/value/description stack inside two or more concentric layers.
- Put every other label in a separate legend, external callout, or visibly reserved non-overlapping region. If those regions do not fit, use a stacked comparison, flow, or table instead.
- When rendering cannot confirm the layout and static review leaves any collision risk, choose the separate-legend structure below.

\`\`\`html
<div class="nested-market">
<div class="nested-market__rings" aria-hidden="true"><!-- shapes only; no text --></div>
<dl class="nested-market__legend">
<div><dt>Outer layer</dt><dd>Value — explanation</dd></div>
<div><dt>Middle layer</dt><dd>Value — explanation</dd></div>
<div><dt>Inner layer</dt><dd>Value — explanation</dd></div>
</dl>
</div>
\`\`\`

## Mermaid diagram theme discipline (dark decks)

Mermaid's default theme is built for white pages: near-black labels (\`#333\`), pale node fills, black strokes, and a TRANSPARENT svg background. Embedded in a dark-themed deck it produces the failure users report as "the diagram text is unreadable in dark mode": dark labels sitting directly on the dark slide background. Prefer a hand-written HTML/CSS/SVG diagram styled with the deck's own tokens (\`--bg\`, \`--fg\`, \`--accent\`) — it never drifts from the theme and needs no external JS. When you do embed Mermaid, pick the theme from the slide background at initialize time — never leave the default (light) theme on a dark deck:
Expand Down
18 changes: 9 additions & 9 deletions apps/daemon/src/prompts/directions.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Built-in design direction library.
*
* Distilled from huashu-design's "5 schools × 20 philosophies" idea: when
* the user hasn't specified a brand and selected "Pick a direction for me"
* in the discovery form, the agent emits a *second* `<question-form>` whose
* radio options are these 5 schools. Each school carries a concrete spec —
* fonts, palette in OKLch, mood keywords, real-world references — that the
* agent then encodes into the active CSS `:root` tokens before generating.
* Distilled from huashu-design's "5 schools × 20 philosophies" idea. The
* library gives the agent concrete visual references to infer from by default.
* When the user explicitly asks to compare visual directions, it can also
* render these schools as `<question-form>` choices. Each school carries a
* concrete spec — fonts, palette in OKLch, mood keywords, real-world
* references — that the agent encodes into active CSS `:root` tokens.
*
* The library has TWO purposes:
*
Expand Down Expand Up @@ -273,9 +273,9 @@ export function renderDirectionSpec(d: DesignDirection): string {

export function renderDirectionSpecBlock(): string {
const lines: string[] = [
'## Direction library — bind into `:root` when the user picks one',
'## Direction library — infer and bind by default',
'',
'Each direction below carries a CSS-ready palette (OKLch values) and font stacks. When the user selects one in the direction-form, replace the seed template\'s `:root` block with that direction\'s palette and font stacks **verbatim** — do not improvise. Posture cues describe how that direction *behaves* (border weight, radius, accent budget); honour them in the layout choices.',
'Each direction below carries a CSS-ready palette (OKLch values) and font stacks. Infer the best match from the brief and known context, then bind it without asking. If the user explicitly requested direction comparison and selected one in a direction-form, use that selection instead. Replace the seed template\'s `:root` block with the chosen direction\'s palette and font stacks **verbatim** — do not improvise. Posture cues describe how that direction *behaves* (border weight, radius, accent budget); honour them in the layout choices.',
'',
];
for (const d of DESIGN_DIRECTIONS) {
Expand Down Expand Up @@ -304,7 +304,7 @@ export function renderDirectionIndexBlock(): string {
return lines.join('\n');
}

/** Resolve a direction by id (preferred) or label; used by `od tools directions`. */
/** Resolve an inferred or user-selected direction; used by `od tools directions`. */
export function formatDirectionSpecText(idOrLabel: string): string | null {
const needle = idOrLabel.trim().toLowerCase();
if (!needle) return null;
Expand Down
Loading
Loading