├── .prettierrc
├── results
├── .gitkeep
└── result-2025-12-07-16-48-32.json
├── .bunversion
├── .cocominify
├── GEMINI.md
├── .env.example
├── .prettierignore
├── .cocoignore
├── vitest-setup.js
├── svelte.config.js
├── lib
├── tools
│ ├── index.ts
│ ├── result-write.ts
│ └── test-component.ts
├── test-discovery.ts
├── utils.ts
├── report.ts
├── pricing.ts
├── utils.test.ts
├── output-test-runner.ts
├── verify-references.ts
├── pricing.test.ts
├── report-styles.ts
└── report-template.ts
├── CLAUDE.md
├── verify-references.ts
├── scripts
└── install.sh
├── vitest.config.ts
├── tests
├── snippets
│ ├── Reference.svelte
│ ├── prompt.md
│ └── test.ts
├── counter
│ ├── Reference.svelte
│ ├── prompt.md
│ └── test.ts
└── derived-by
│ ├── Reference.svelte
│ ├── prompt.md
│ └── test.ts
├── .gitignore
├── .github
└── workflows
│ └── test.yml
├── tsconfig.json
├── eslint.config.js
├── generate-report.ts
├── patches
└── @ai-sdk+mcp+0.0.11.patch
├── package.json
├── README.md
├── AGENTS.md
└── index.ts
/.prettierrc:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/results/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.bunversion:
--------------------------------------------------------------------------------
1 | bun-v1.3.4
--------------------------------------------------------------------------------
/.cocominify:
--------------------------------------------------------------------------------
1 | tests/
2 | data/
--------------------------------------------------------------------------------
/GEMINI.md:
--------------------------------------------------------------------------------
1 | @AGENTS.md
2 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | VERCEL_OIDC_TOKEN="create with vercel cli"
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # Ignore artifacts:
2 | tests
3 | results
--------------------------------------------------------------------------------
/.cocoignore:
--------------------------------------------------------------------------------
1 | .env.example
2 | results/
3 | .claude
4 | patches
--------------------------------------------------------------------------------
/vitest-setup.js:
--------------------------------------------------------------------------------
1 | import "@testing-library/jest-dom/vitest";
2 |
--------------------------------------------------------------------------------
/svelte.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | compilerOptions: {
3 | runes: true,
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/lib/tools/index.ts:
--------------------------------------------------------------------------------
1 | export { resultWriteTool } from "./result-write.ts";
2 | export { testComponentTool } from "./test-component.ts";
3 |
--------------------------------------------------------------------------------
/CLAUDE.md:
--------------------------------------------------------------------------------
1 | # CLAUDE.md
2 |
3 | This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4 |
5 | @AGENTS.md
6 |
--------------------------------------------------------------------------------
/verify-references.ts:
--------------------------------------------------------------------------------
1 | import { verifyAllReferences } from "./lib/verify-references.ts";
2 |
3 | console.log("=== Reference Implementation Verification ===\n");
4 |
5 | const exitCode = await verifyAllReferences();
6 |
7 | process.exit(exitCode);
8 |
--------------------------------------------------------------------------------
/scripts/install.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Read the Bun version from .bunversion file
4 | if [ -f ".bunversion" ]; then
5 | BUN_VERSION=$(cat .bunversion | tr -d '[:space:]')
6 | echo "Installing Bun version: $BUN_VERSION"
7 | curl -fsSL https://bun.com/install | bash -s "$BUN_VERSION"
8 | else
9 | echo "Error: .bunversion file not found"
10 | exit 1
11 | fi
12 |
--------------------------------------------------------------------------------
/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vitest/config";
2 | import { svelte } from "@sveltejs/vite-plugin-svelte";
3 | import { svelteTesting } from "@testing-library/svelte/vite";
4 |
5 | export default defineConfig({
6 | plugins: [svelte(), svelteTesting()],
7 | test: {
8 | environment: "jsdom",
9 | setupFiles: ["./vitest-setup.js"],
10 | include: ["**/*.{test,spec}.{js,ts,jsx,tsx}", "**/test.ts"],
11 | },
12 | });
13 |
--------------------------------------------------------------------------------
/lib/tools/result-write.ts:
--------------------------------------------------------------------------------
1 | import { tool } from "ai";
2 | import { z } from "zod";
3 |
4 | export const resultWriteTool = tool({
5 | description:
6 | "Write your final Svelte component code. Call this when you have completed implementing the component and are ready to submit.",
7 | inputSchema: z.object({
8 | content: z.string().describe("The complete Svelte component code"),
9 | }),
10 | execute: async ({ content }) => {
11 | const lines = content.split("\n").length;
12 | console.log(`[ResultWrite] Received ${lines} lines of code`);
13 | return { success: true };
14 | },
15 | });
16 |
--------------------------------------------------------------------------------
/tests/snippets/Reference.svelte:
--------------------------------------------------------------------------------
1 |
Words: {textStats.wordCount}
29 |Characters: {textStats.charCount}
30 |31 | Status: {textStats.isLongText ? "Long text" : "Short text"} 32 |
33 |Words: 0
32 |Characters: 0
33 |Status: Short text
34 |${escapeHtml(inputJson)}
85 | ${escapeHtml(outputText)}
96 | ${escapeHtml(ft.errorMessage)}
122 | ${escapeHtml(getFirstLines(test.resultWriteContent, 5))}
211 |
212 |
216 | ${escapeHtml(test.prompt)}
231 |