HK-hub/AgentSkills / archify
archify
FlaggedCreate polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as explorable standalone HTML with inline SVG, dark/light themes, semantic navigation, optional trace motion, an optional 1200×630 Share Card PNG, and PNG/JPEG/WebP/SVG/WebM export. Accept plain-language requirements or pasted Mermaid flowchart, sequenceDiagram, and stateDiagram input; inspect repository evidence when the diagram must reflect real code. Use when the user asks to visualize system architecture, infrastructure, cloud/security/network topology, technical workflows, approval or CI/CD flows, API call sequences, request lifecycles, data pipelines, ETL/ELT, data lineage, state machines, or to convert/beautify Mermaid. Prefer typed JSON IR renderers and deterministic validation; deliver static output by default, enable motion only when requested, and use optional post-commit opening only for an interactive local handoff.
test/proof-aperture.test.mjs
View on GitHubimport { test } from 'node:test';
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const landing = fs.readFileSync(path.resolve(__dirname, '..', '..', 'docs', 'index.html'), 'utf8');
function cssRule(selector) {
const escaped = selector.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const match = landing.match(new RegExp(`${escaped}\\s*\\{([^}]+)\\}`));
assert.ok(match, `${selector}: CSS rule missing`);
return match[1];
}
test('landing declares a truthful first-fold proof aperture in document order', () => {
assert.match(landing, /<section class="hero" data-proof-aperture="first-fold">/);
const heroStart = landing.indexOf('data-proof-aperture="first-fold"');
const headline = landing.indexOf('data-i18n="hero-h1"', heroStart);
const actions = landing.indexOf('class="hero-actions', headline);
const proof = landing.indexOf('id="hero-proof-stage"', actions);
assert.ok(heroStart < headline && headline < actions && actions < proof);
});
test('desktop hero budget exposes live diagram content without shrinking its canvas', () => {
assert.match(cssRule('.hero'), /padding-top:5\.5rem/);
assert.match(cssRule('.hero-badge'), /margin-bottom:1\.125rem/);
assert.match(cssRule('.hero h1'), /margin-bottom:\.875rem/);
assert.match(cssRule('.hero-sub'), /margin:0 auto 1\.375rem/);
assert.match(cssRule('.hero-actions'), /margin-bottom:1\.5rem/);
assert.match(cssRule('.hero-actions .btn'), /min-height:44px/);
assert.match(cssRule('.proof-viewport'), /height:clamp\(500px,52vw,610px\)/);
});
test('narrow mobile gets an independently tuned proof aperture and full-size actions', () => {
const mobile = landing.match(/@media\(max-width:640px\)\s*\{([\s\S]+?)\n\s*\}\n\s*<\/style>/)?.[1];
assert.ok(mobile, 'narrow mobile media query missing');
assert.match(mobile, /\.hero\s*\{\s*padding-top:4\.75rem;\s*\}/);
assert.match(mobile, /\.hero-actions\s*\{\s*flex-direction:column;\s*gap:\.625rem;\s*\}/);
assert.match(mobile, /\.hero-actions \.btn\s*\{\s*width:100%;\s*justify-content:center;\s*\}/);
assert.match(mobile, /\.proof-viewport\s*\{\s*height:400px;\s*\}/);
});
test('proof aperture remains one real eager sandboxed artifact with explicit user-selected identities', () => {
assert.equal((landing.match(/<iframe id="hero-proof-frame"/g) || []).length, 1);
assert.match(landing, /loading="eager"/);
assert.match(landing, /sandbox="allow-scripts"/);
assert.doesNotMatch(landing, /sandbox="[^"]*allow-same-origin/);
assert.equal((landing.match(/class="proof-tab"/g) || []).length, 3);
assert.match(landing, /data-proof-playback="first-fold-once"/);
assert.match(landing, /\?embed=1&play=1&theme=dark#view=happy-path/);
assert.doesNotMatch(landing, /setInterval\(|scrollIntoView\(|scroll-triggered|proof-carousel/);
});
test('initial proof playback uses one sandboxed load without parent-frame reach-through', () => {
assert.match(landing, /src="gallery\/artifacts\/agent-tool-call\.workflow\.html\?embed=1&play=1&theme=dark#view=happy-path"/);
assert.doesNotMatch(landing, /initialProof|proofFrameDocumentIsReady|proofFrame\.contentWindow|proofFrame\.contentDocument/);
assert.match(landing, /proofFrame\.addEventListener\('load', \(\) => \{/);
assert.match(landing, /proofStage\.classList\.remove\('is-loading'\)/);
});
test('proof playback delegates reduced motion to the artifact and keeps deliberate-choice boundaries', () => {
assert.match(landing, /renderProof\(tab\.dataset\.proof, \{ deliberate: true \}\)/);
assert.match(landing, /renderProof\(tabs\[next\]\.dataset\.proof, \{ focus: true, deliberate: true \}\)/);
assert.match(landing, /proofEmbedUrl\(proof, \{ play: deliberate \}\)/);
assert.match(landing, /document\.querySelectorAll\('\.fade-up'\)\.forEach\(el => el\.classList\.add\('visible'\)\)/);
assert.doesNotMatch(landing, /addEventListener\('scroll'/);
});
test('aperture uses normal flow and preserves reduced-motion boundaries', () => {
const hero = cssRule('.hero');
const proof = cssRule('.hero-proof');
assert.doesNotMatch(hero + proof, /position:absolute|transform:|top:-|margin-top:-|height:100vh/);
assert.match(landing, /@media\s*\(prefers-reduced-motion:\s*reduce\)/);
assert.match(landing, /\.fade-up\s*\{\s*opacity:1!important;\s*transform:none!important;/);
assert.match(landing, /\.pulse-dot,\.proof-live::before\s*\{\s*animation:none!important;\s*\}/);
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |