Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
test: lock benchmark attempt-one contract
tt-a1ifcedfa50cd9a
diff --git a/archify/test/ordinary-model-floor.test.mjs b/archify/test/ordinary-model-floor.test.mjsindex 1fbfa065..f025bc43 100644--- a/archify/test/ordinary-model-floor.test.mjs+++ b/archify/test/ordinary-model-floor.test.mjs@@ -415,6 +415,30 @@ test('checked-in benchmark suite covers all five diagram types without presentin}});+test('suite integrity rejects a long prompt that omits the attempt-1 file contract', () => {+ const sourceSuite = path.join(repoRoot, 'benchmarks/ordinary-model-floor');+ const incompletePrompt = path.join(tmp, 'incomplete-benchmark-prompt.md');+ fs.writeFileSync(+ incompletePrompt,+ `# Plausible but incomplete prompt\n\n${'Describe the requested system accurately. '.repeat(12)}`,+ );+ const manifest = JSON.parse(fs.readFileSync(path.join(sourceSuite, 'manifest.json'), 'utf8'));+ manifest.cases = manifest.cases.map((entry, index) => ({+ ...entry,+ case: path.resolve(sourceSuite, entry.case),+ prompt: index === 0 ? incompletePrompt : path.resolve(sourceSuite, entry.prompt),+ reference_fixture: path.resolve(sourceSuite, entry.reference_fixture),+ }));+ const manifestFile = writeJson('prompt-contract.manifest.json', manifest);++ const result = run(['check', '--manifest', manifestFile]);++ assert.equal(result.status, 1, result.stderr || result.stdout);+ assert.equal(result.stderr, '');+ const receipt = JSON.parse(result.stdout);+ assert.equal(receipt.cases.find((item) => item.caseId === 'web-runtime-architecture').promptOk, false);+});+test('benchmark fails closed with machine-readable errors for malformed JSON and mismatched run identity', () => {const caseFile = writeJson('identity.case.json', {schema_version: 1,diff --git a/benchmarks/ordinary-model-floor/README.md b/benchmarks/ordinary-model-floor/README.mdindex 6e912cfb..0f386de1 100644--- a/benchmarks/ordinary-model-floor/README.md+++ b/benchmarks/ordinary-model-floor/README.md@@ -24,7 +24,7 @@ node benchmarks/ordinary-model-floor/benchmark.mjs check --manifest benchmarks/o## Fair-run protocol-Every compared configuration must use the same prompt, the same repository commit, the same Archify skill and schema, the same time limit, and a clean candidate output path. Record the exact agent and model names. Preserve the unedited attempt 1 candidate and permit no post-hoc edits before verification.+Every compared configuration must use the same prompt, the same repository commit, the same Archify skill and schema, the same time limit, and a clean candidate output path. Record the exact agent and model names. One complete agent invocation is attempt 1: the agent may use Archify's own diagnostics inside that invocation, but the resulting `benchmark-candidate.json` is frozen when the invocation ends. Preserve that unedited candidate and permit no post-hoc edits, including human edits, before verification.Do not let a later correction replace attempt 1. Correction attempts may be retained for diagnosis, but the first-pass report accepts only attempt 1 receipts. Run every case in the manifest for every configuration; an incomplete or duplicated matrix is not evidence-eligible.diff --git a/benchmarks/ordinary-model-floor/benchmark.mjs b/benchmarks/ordinary-model-floor/benchmark.mjsindex ab934e6b..6bb6c0e7 100644--- a/benchmarks/ordinary-model-floor/benchmark.mjs+++ b/benchmarks/ordinary-model-floor/benchmark.mjs@@ -15,6 +15,12 @@ const COLLECTIONS = {dataflow: { nodes: 'nodes', relationships: 'flows' },lifecycle: { nodes: 'states', relationships: 'transitions' },};+const PROMPT_CONTRACT_PHRASES = [+ 'Write the final candidate to exactly `benchmark-candidate.json` in the repository root.',+ 'Do not edit any other file.',+ 'The candidate file, not the prose response, is the attempt 1 artifact.',+ 'Do not copy a checked-in example.',+];class BenchmarkError extends Error {constructor(code, message) {@@ -256,7 +262,8 @@ function check(args) {return {caseId: benchmarkCase.id,diagramType: benchmarkCase.diagram_type,- promptOk: prompt.length >= 200,+ promptOk: prompt.length >= 200+ && PROMPT_CONTRACT_PHRASES.every((phrase) => prompt.includes(phrase)),semanticOk: semantic.ok,validationOk: validation.ok,};diff --git a/benchmarks/ordinary-model-floor/prompts/agent-run.lifecycle.md b/benchmarks/ordinary-model-floor/prompts/agent-run.lifecycle.mdindex b5209299..917a3bb4 100644--- a/benchmarks/ordinary-model-floor/prompts/agent-run.lifecycle.md+++ b/benchmarks/ordinary-model-floor/prompts/agent-run.lifecycle.md@@ -2,4 +2,6 @@Use the Archify skill in this repository to create a lifecycle diagram for an agent run. Show the main ordered phases from queued through planning, execution, review, and completion. Execution may pause for human approval or fail recoverably. Review may block while waiting for input. A blocked run may expire, and a waiting approval may be cancelled by the user. Terminal exits must remain distinct from active and waiting states.-Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Keep active work, interruptions, recovery, and terminal outcomes legible; do not copy a checked-in example.+Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Keep active work, interruptions, recovery, and terminal outcomes legible.++Write the final candidate to exactly `benchmark-candidate.json` in the repository root. Do not edit any other file. Run the real Archify CLI against that file with the `showcase` quality profile; you may diagnose and correct your own candidate during this single agent invocation. The candidate file, not the prose response, is the attempt 1 artifact. Do not copy a checked-in example.diff --git a/benchmarks/ordinary-model-floor/prompts/agent-tool-call.workflow.md b/benchmarks/ordinary-model-floor/prompts/agent-tool-call.workflow.mdindex f0afeacd..c68f073d 100644--- a/benchmarks/ordinary-model-floor/prompts/agent-tool-call.workflow.md+++ b/benchmarks/ordinary-model-floor/prompts/agent-tool-call.workflow.md@@ -2,4 +2,6 @@Use the Archify skill in this repository to create a workflow diagram for an AI agent tool call. A user request reaches a chat surface and planner. A router decides whether human approval is required. Approval permits tool execution against an external provider; denial enters a blocked path that may retry. The final result returns to the user, while tool results and context are recorded for tracing.-Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Make the approval decision, denied route, execution route, and external call easy to read; do not copy a checked-in example.+Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Make the approval decision, denied route, execution route, and external call easy to read.++Write the final candidate to exactly `benchmark-candidate.json` in the repository root. Do not edit any other file. Run the real Archify CLI against that file with the `showcase` quality profile; you may diagnose and correct your own candidate during this single agent invocation. The candidate file, not the prose response, is the attempt 1 artifact. Do not copy a checked-in example.diff --git a/benchmarks/ordinary-model-floor/prompts/cache-miss.sequence.md b/benchmarks/ordinary-model-floor/prompts/cache-miss.sequence.mdindex 721c31af..7e6ab4ad 100644--- a/benchmarks/ordinary-model-floor/prompts/cache-miss.sequence.md+++ b/benchmarks/ordinary-model-floor/prompts/cache-miss.sequence.md@@ -2,4 +2,6 @@Use the Archify skill in this repository to create a sequence diagram for a dashboard request. A browser calls an API, the API validates the JWT, then reads Redis. Redis returns a cache miss, so the API queries PostgreSQL for profile and metric data, stores the result back in Redis, emits a trace, and returns JSON for the browser to render.-Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Preserve message direction and distinguish calls, returns, security checks, and asynchronous trace emission; do not copy a checked-in example.+Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Preserve message direction and distinguish calls, returns, security checks, and asynchronous trace emission.++Write the final candidate to exactly `benchmark-candidate.json` in the repository root. Do not edit any other file. Run the real Archify CLI against that file with the `showcase` quality profile; you may diagnose and correct your own candidate during this single agent invocation. The candidate file, not the prose response, is the attempt 1 artifact. Do not copy a checked-in example.diff --git a/benchmarks/ordinary-model-floor/prompts/product-analytics.dataflow.md b/benchmarks/ordinary-model-floor/prompts/product-analytics.dataflow.mdindex 1f55cece..84dbe79e 100644--- a/benchmarks/ordinary-model-floor/prompts/product-analytics.dataflow.md+++ b/benchmarks/ordinary-model-floor/prompts/product-analytics.dataflow.md@@ -2,4 +2,6 @@Use the Archify skill in this repository to create a data-flow diagram for product analytics. Web and mobile clients send events to an edge ingestion API. Consent is checked before identity data enters a protected PII vault. Accepted events enter a stream, become normalized warehouse facts, and feed dashboards. Aggregated warehouse data also feeds a feature store and model.-Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Make the privacy boundary and restricted identity path visually distinct from the ordinary analytics path; do not copy a checked-in example.+Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Make the privacy boundary and restricted identity path visually distinct from the ordinary analytics path.++Write the final candidate to exactly `benchmark-candidate.json` in the repository root. Do not edit any other file. Run the real Archify CLI against that file with the `showcase` quality profile; you may diagnose and correct your own candidate during this single agent invocation. The candidate file, not the prose response, is the attempt 1 artifact. Do not copy a checked-in example.diff --git a/benchmarks/ordinary-model-floor/prompts/web-runtime.architecture.md b/benchmarks/ordinary-model-floor/prompts/web-runtime.architecture.mdindex 1d92c41c..7cac1129 100644--- a/benchmarks/ordinary-model-floor/prompts/web-runtime.architecture.md+++ b/benchmarks/ordinary-model-floor/prompts/web-runtime.architecture.md@@ -2,4 +2,6 @@Use the Archify skill in this repository to create an architecture diagram for a production web application. Browser users enter through a CDN over HTTPS, then traffic reaches a load balancer and an application API. The API verifies identity with an auth provider, reads through a Redis cache, queries a PostgreSQL primary database, and enqueues background work for a worker. Static assets are served from object storage.-Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Preserve the system roles and labelled technical relationships; do not copy a checked-in example.+Author a fresh typed JSON diagram specification and validate it with the `showcase` quality profile. Choose your own stable internal IDs and layout. Preserve the system roles and labelled technical relationships.++Write the final candidate to exactly `benchmark-candidate.json` in the repository root. Do not edit any other file. Run the real Archify CLI against that file with the `showcase` quality profile; you may diagnose and correct your own candidate during this single agent invocation. The candidate file, not the prose response, is the attempt 1 artifact. Do not copy a checked-in example.