graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
docs: refresh README with workshop artwork and framed desktop images
Rach Pradhan69b54d5467a1
diff --git a/README.md b/README.mdindex 3036207b..3264806f 100644--- a/README.md+++ b/README.md@@ -1,5 +1,5 @@<p align="center">- <img src="codegraff.png" alt="codegraff" width="360">+ <img src="docs/images/readme-workshop.jpg" alt="The CodeGraff workshop: a crew of rats in coral coats coordinating work. Small crew. Real work." width="960"></p><h1 align="center">graff</h1>@@ -46,14 +46,14 @@ macOS window controls and SwiftUI Activity and computer-use panels. Codingcontinues in `graff acp`; the window is a client of the same harness used bythe terminal.-+[](docs/images/desktop-chat-dark.png)Chat tabs, searchable model selection, effort and fast controls, collapsed toolactivity, and explicit working/finished/interrupted states keep the conversationreadable. Appearance includes White, Black, Website and the official CodeGraffpalette. Mention `$gui-theme` or `@gui-theme` in the GUI to create a custom theme.-+[](docs/images/desktop-agents-codegraff.png)**Agents** brings Graff-to-Graff coordination into the GUI. See sessions in thecurrent workspace or across the laptop, their published tasks and activity,@@ -63,7 +63,7 @@ history does not consume their inbox. The optional profiler records anonymousper-agent resource measurements, with identities and message contents excludedfrom feedback exports. See the [Agents guide](docs/agents-panel.md).-+[](docs/images/desktop-review-codegraff.png)**Changes** shows local staged, unstaged and untracked edits, diffs, worktreesand recent commits. Drag its divider to give the review more room. The browser@@ -71,8 +71,9 @@ pane renders directly in Chromium and supports navigation, find, zoom and elemenpins. Optional macOS computer use exposes native app inspection and input afterthe user enables it and grants the operating system permissions.-*Screenshots show the current GUI with scripted demonstration content. No private-conversation or workspace data is included.*+*Presentation frames pair CodeGraff workshop artwork with unchanged GUI captures+and scripted demonstration content. Click a desktop image for the full-size UI.+No private conversation or workspace data is included.***Build and launch the preview** on Apple Silicon macOS 14+ with Bun, Zig andXcode command-line tools installed:@@ -147,7 +148,7 @@ stays on (ADR 0031). We do not steal grok-build's heap or a 4-tool catalog(ADR 0024).<p align="center">- <img src="token-efficient-loop.png" alt="Stable cache layers feed a small programmatic loop that tests parallel tool paths and keeps a slim result" width="960">+ <img src="docs/images/readme-context-workshop.jpg" alt="A workshop rat examines a proof: stable context, small programs, and focused results keep useful context in the harness" width="960"></p>## Installdiff --git a/docs/images/desktop-agents-studio.jpg b/docs/images/desktop-agents-studio.jpgnew file mode 100644index 00000000..93611013Binary files /dev/null and b/docs/images/desktop-agents-studio.jpg differdiff --git a/docs/images/desktop-chat-studio.jpg b/docs/images/desktop-chat-studio.jpgnew file mode 100644index 00000000..46470be7Binary files /dev/null and b/docs/images/desktop-chat-studio.jpg differdiff --git a/docs/images/desktop-review-studio.jpg b/docs/images/desktop-review-studio.jpgnew file mode 100644index 00000000..890a66bfBinary files /dev/null and b/docs/images/desktop-review-studio.jpg differdiff --git a/docs/images/readme-context-workshop.jpg b/docs/images/readme-context-workshop.jpgnew file mode 100644index 00000000..1831b8c3Binary files /dev/null and b/docs/images/readme-context-workshop.jpg differdiff --git a/docs/images/readme-workshop.jpg b/docs/images/readme-workshop.jpgnew file mode 100644index 00000000..0a5622d0Binary files /dev/null and b/docs/images/readme-workshop.jpg differdiff --git a/docs/media/README.md b/docs/media/README.mdnew file mode 100644index 00000000..6f1a99f8--- /dev/null+++ b/docs/media/README.md@@ -0,0 +1,30 @@+# README imagery++The README uses CodeGraff's workshop artwork: black field mice in coral coats,+textured paper, ink, cobalt, and restrained editorial typography. Desktop plates+add rounded presentation frames and soft shadows around actual GUI captures.+The screenshots are unchanged; the window chrome outside them is presentation+decoration. README links open the original PNGs for closer inspection.++## Regenerate++Install the desktop dependencies with `bun install` in `apps/native`, then run+from the repository root:++```sh+apps/native/node_modules/.bin/electron docs/media/render-readme.cjs+```++The renderer uses a temporary Electron profile, blocks network requests, waits+for fonts and images, checks viewport bounds, and writes JPEGs into `docs/images`.+Exports have a fixed width of 1920 pixels on both standard and Retina displays.++`readme-plates.cjs` owns the copy, artwork selection, and source screenshot paths;+`readme-plates.css` owns the layout. Original artwork is in `art/`. Keep real+conversation data out of source captures; use the desktop's scripted visual+fixtures described in [the visual test guide](../../apps/native/electron/VISUAL-TESTS.md).++For the official typography, set `GRAFF_DESIGN_FONTS` to a local directory+containing licensed `SinarGrotesk-SemiBold.woff2` and `Gramatika-Regular.woff2`.+Font files are not redistributed here. Without that variable, the layouts use+system fonts. Review the rendered images after changing typography or copy.diff --git a/docs/media/art/workshop-agents.jpg b/docs/media/art/workshop-agents.jpgnew file mode 100644index 00000000..913e27d8Binary files /dev/null and b/docs/media/art/workshop-agents.jpg differdiff --git a/docs/media/art/workshop-review.jpg b/docs/media/art/workshop-review.jpgnew file mode 100644index 00000000..137fbcc1Binary files /dev/null and b/docs/media/art/workshop-review.jpg differdiff --git a/docs/media/art/workshop-run.jpg b/docs/media/art/workshop-run.jpgnew file mode 100644index 00000000..c12e6747Binary files /dev/null and b/docs/media/art/workshop-run.jpg differdiff --git a/docs/media/readme-plates.cjs b/docs/media/readme-plates.cjsnew file mode 100644index 00000000..448f2204--- /dev/null+++ b/docs/media/readme-plates.cjs@@ -0,0 +1,34 @@+const fs = require('node:fs');+const path = require('node:path');+const root = path.resolve(__dirname, '../..');+const uri = file => `data:${file.endsWith('.woff2') ? 'font/woff2' : file.endsWith('.png') ? 'image/png' : 'image/jpeg'};base64,${fs.readFileSync(file).toString('base64')}`;+const art = name => uri(path.join(__dirname, 'art', `workshop-${name}.jpg`));+const shot = name => uri(path.join(root, 'docs/images', `desktop-${name}.png`));+const grain = `<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency=".75" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" opacity=".3" filter="url(#n)"/></svg>`;+const mark = `<svg viewBox="0 0 32 32" fill="none"><path d="M26 8a13 13 0 1 0 1 15" stroke="currentColor" stroke-width="3" stroke-linecap="round"/><path d="m12 12-4 4 4 4m9-8 4 4-4 4m-3-10-3 12" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>`;+function fonts() {+ const dir = process.env.GRAFF_DESIGN_FONTS;+ if (!dir) return '';+ return [['Display', 'SinarGrotesk-SemiBold.woff2'], ['Body', 'Gramatika-Regular.woff2']].map(([name, file]) => `@font-face{font-family:${name};src:url('${uri(path.join(dir, file))}')} `).join('');+}+function page(body, theme = '') {+ return `<!doctype html><html><head><meta charset="utf-8"><style>${fonts()}${fs.readFileSync(path.join(__dirname, 'readme-plates.css'), 'utf8')} .grain{background-image:url('data:image/svg+xml;base64,${Buffer.from(grain).toString('base64')}')}</style></head><body><main class="${theme}"><div class="grain"></div>${body}</main></body></html>`;+}+const brand = (label = 'DESKTOP / MACOS') => `<div class="brand">${mark}<span>codegraff</span><small>${label}</small></div>`;+const windowFrame = (image, tone) => `<div class="window ${tone}"><div class="chrome"><div class="lights"><i></i><i></i><i></i></div><span>CodeGraff</span><b>●</b></div><img class="screenshot" src="${image}" /></div>`;+function screen({ id, title, note, label, file, artName, theme }) {+ return page(`${brand()}<header><div class="eyebrow">${id} / ${label}</div><h1>${title}</h1><p>${note}</p></header>+ <div class="art-stamp"><img src="${art(artName)}" /></div><div class="stage">${windowFrame(shot(file), theme === 'night' ? 'dark' : 'paper')}</div>+ <footer><span class="footer-label">${label}</span><span>Actual desktop UI · demonstration workspace</span><span class="edition">GRAFF / DESKTOP</span></footer>`, theme);+}+module.exports = [+ { name: 'readme-workshop', width: 1920, height: 1040, html: () => page(`${brand('THE CODING WORKSHOP')}+ <div class="hero-copy"><div class="eyebrow">OPEN SOURCE. HANDS ON.</div><h1>Small crew.<br>Real work.</h1><p>Give Graff the task.<br>Make something worth keeping.</p><div class="rule"></div><span class="signature">Code. Coordinate. Review.</span></div>+ <div class="hero-art"><img src="${art('run')}" /></div><div class="hero-bottom">THE GRAFF WORKSHOP <span>CODEGRAFF</span></div>`, 'hero') },+ { name: 'desktop-chat-studio', width: 1920, height: 1530, html: () => screen({ id:'01', title:'A place to do the work.', note:'A clear conversation. Your tools close at hand.', label:'THE WORKSPACE', file:'chat-dark', artName:'run', theme:'night' }) },+ { name: 'desktop-agents-studio', width: 1920, height: 1530, html: () => screen({ id:'02', title:'Many hands. One workspace.', note:'See the crew. Share context. Pass the work along.', label:'AGENT COORDINATION', file:'agents-codegraff', artName:'agents', theme:'warm' }) },+ { name: 'desktop-review-studio', width: 1920, height: 1530, html: () => screen({ id:'03', title:'Room for a closer look.', note:'Keep the conversation beside the changes.', label:'CHANGES & REVIEW', file:'review-codegraff', artName:'review', theme:'coral' }) },+ { name: 'readme-context-workshop', width:1920, height:1060, html: () => page(`${brand('INSIDE THE HARNESS')}+ <div class="loop-art"><img src="${art('review')}" /></div><div class="loop-copy"><div class="eyebrow">CONTEXT, WITH CARE</div><h1>Keep the useful.<br>Leave the noise.</h1><ol><li><b>01</b><div><strong>Stable context</strong><p>Keep reusable instructions in the cache prefix.</p></div></li><li><b>02</b><div><strong>Small programs</strong><p>Work over context and coordinate tool calls.</p></div></li><li><b>03</b><div><strong>Focused results</strong><p>Bring back what the next step needs.</p></div></li></ol></div>+ <div class="hero-bottom">THE GRAFF WORKSHOP <span>CONTEXT → TOOLS → RESULTS</span></div>`, 'loop') },+];diff --git a/docs/media/readme-plates.css b/docs/media/readme-plates.cssnew file mode 100644index 00000000..e3f6044e--- /dev/null+++ b/docs/media/readme-plates.css@@ -0,0 +1,42 @@+* { box-sizing: border-box; }+html, body { margin: 0; }+body { font-family: Body, -apple-system, sans-serif; color: #1b1714; }+main { width: 1920px; height: 1530px; position: relative; overflow: hidden; background: #f6eedf; }+.grain { position: absolute; inset: 0; opacity: .17; pointer-events: none; mix-blend-mode: multiply; z-index: 1; }+.brand { position: absolute; left: 84px; top: 56px; right: 84px; display: flex; align-items: center; gap: 13px; font-size: 28px; letter-spacing: -.5px; z-index: 3; }+.brand svg { width: 34px; height: 34px; }+.brand small { margin-left: auto; font: 15px ui-monospace, monospace; letter-spacing: 3px; opacity: .75; }+header { position: absolute; left: 84px; top: 150px; z-index: 3; }+.eyebrow { font: 15px ui-monospace, monospace; letter-spacing: 2.6px; color: #ad4937; }+h1 { font-family: Display, -apple-system, sans-serif; font-weight: 600; letter-spacing: -3.2px; line-height: 1.04; margin: 25px 0 20px; font-size: 74px; }+header p { font-size: 27px; opacity: .76; margin: 0; }+.art-stamp { position: absolute; right: 68px; top: 108px; width: 352px; height: 216px; border-radius: 120px 110px 90px 105px; overflow: hidden; transform: rotate(3deg); border: 1px solid #1b171425; }+.art-stamp img { width: 100%; height: 100%; object-fit: cover; }+.stage { position: absolute; left: 84px; right: 84px; top: 356px; z-index: 2; }+.window { border-radius: 20px; overflow: hidden; border: 1px solid #ffffff55; box-shadow: 0 42px 65px -35px #15100d65, 0 20px 30px -18px #15100d50, 0 1px 0 #ffffff80 inset; background: #f6eedf; }+.chrome { height: 42px; display: flex; align-items: center; position: relative; justify-content: center; border-bottom: 1px solid #1b171417; color: #6a6053; font: 14px Body, sans-serif; background: #eee4d4; }+.lights { position: absolute; left: 19px; display: flex; gap: 9px; }+.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ed6a5e; box-shadow: inset 0 0 0 1px #00000014; }+.lights i:nth-child(2) { background: #f4be4f; }.lights i:nth-child(3) { background: #62c554; }+.chrome b { position:absolute; right:20px; font-size:9px; opacity:.45; }+.screenshot { display: block; width: 100%; height: auto; }+.dark { border-color: #f6eedf35; }.dark .chrome { background: #252526; color: #d0cbc2; border-color: #ffffff10; }+footer { position: absolute; left: 84px; right: 84px; bottom: 43px; display: flex; align-items: center; gap: 24px; border-top: 1px solid #1b171430; padding-top: 24px; font-size: 18px; }+.footer-label { font: 14px ui-monospace, monospace; letter-spacing: 2px; }.edition { margin-left: auto; font: 14px ui-monospace, monospace; letter-spacing: 2px; }+.night { background: #243e73; color: #fff4df; }.night .eyebrow { color: #f5b55e; }.night footer { border-color: #f6eedf40; }+.coral { background: #d7654d; }.coral .eyebrow { color: #4f241d; }.coral header p { opacity: .88; }+.hero { height: 1040px; }.hero .brand { right: 1070px; }.hero .brand small { display: none; }+.hero-copy { position: absolute; left:84px; top: 222px; width: 730px; z-index: 2; }+.hero-copy h1 { font-size: 140px; letter-spacing: -7px; margin: 34px 0; }+.hero-copy p { font-size: 31px; line-height:1.5; color:#695c50; margin:0; }+.rule { width: 65px; height: 5px; background:#d45a43; margin: 42px 0 23px; }+.signature { font-size: 20px; }+.hero-art { position:absolute; top: 0; right: 0; width: 980px; height: 964px; overflow:hidden; border-left: 8px solid #d45a43; }+.hero-art img { width:100%; height:100%; object-fit:cover; object-position:51% 50%; }+.hero-bottom { position:absolute; left:84px; bottom:30px; right:84px; display:flex; justify-content:space-between; font: 14px ui-monospace, monospace; letter-spacing:3px; }+.loop { height:1060px; }.loop .brand small { display:none; }+.loop-art { position:absolute; left:0; top:137px; bottom:82px; width:875px; overflow:hidden; }+.loop-art img { width:100%; height:100%; object-fit:cover; object-position:30% center; }+.loop-copy { position:absolute; left:960px; top:164px; width:865px; }.loop-copy h1 { font-size:82px; margin:25px 0 45px; }+.loop-copy ol { list-style:none; margin:0; padding:0; }.loop-copy li { display:flex; gap:26px; border-top:1px solid #1b171426; padding:25px 0; }+.loop-copy li b { color:#c5533d; font:16px ui-monospace,monospace; margin-top:9px; }.loop-copy strong { font: 32px Display, sans-serif; }.loop-copy p { font-size:24px; color:#736557; margin:12px 0 0; line-height:1.4; }diff --git a/docs/media/render-readme.cjs b/docs/media/render-readme.cjsnew file mode 100644index 00000000..ec1a0688--- /dev/null+++ b/docs/media/render-readme.cjs@@ -0,0 +1,31 @@+// Deterministic presentation layouts. Source UI captures and artwork remain unchanged.+const { app, BrowserWindow } = require('electron');+const fs = require('node:fs');+const path = require('node:path');+const os = require('node:os');+const assert = require('node:assert/strict');+const plates = require('./readme-plates.cjs');+const temporary = fs.mkdtempSync(path.join(os.tmpdir(), 'graff-readme-'));+app.setPath('userData', path.join(temporary, 'profile'));+app.commandLine.appendSwitch('force-device-scale-factor', '1');+let win;+const output = path.resolve(__dirname, '../images');+app.whenReady().then(async () => {+ win = new BrowserWindow({ show:false, width:1920, height:1530, useContentSize:true, webPreferences:{ sandbox:true, contextIsolation:true, nodeIntegration:false, backgroundThrottling:false } });+ win.webContents.session.webRequest.onBeforeRequest((details, callback) => callback({cancel: /^https?:/.test(details.url)}));+ for (const plate of plates) {+ win.setContentSize(plate.width, plate.height);+ const html = path.join(temporary, `${plate.name}.html`);+ fs.writeFileSync(html, plate.html());+ await win.loadFile(html);+ const state = await win.webContents.executeJavaScript(`(async()=>{await document.fonts.ready;await Promise.all([...document.images].map(i=>i.decode()));await new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)));return {width:innerWidth,height:innerHeight,overflow:document.documentElement.scrollWidth>innerWidth,images:[...document.images].every(i=>i.naturalWidth>0)}})()`);+ assert.deepEqual(state, {width:plate.width,height:plate.height,overflow:false,images:true});+ const capture = await win.webContents.capturePage();+ // Normalize Retina captures so export size is independent of the display.+ const frame = capture.resize({width:plate.width,height:plate.height,quality:'best'});+ const file = path.join(output, `${plate.name}.jpg`);+ fs.writeFileSync(file, frame.toJPEG(94));+ console.log(`${plate.name}: ${frame.getSize().width}×${frame.getSize().height}, ${Math.round(fs.statSync(file).size/1024)} KiB`);+ }+}).then(()=>finish(0)).catch(error=>{console.error(error);finish(1)});+function finish(code) { if(win&&!win.isDestroyed())win.destroy(); fs.rmSync(temporary,{recursive:true,force:true}); app.exit(code); }