# scriptc - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for scriptc. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Users who want to understand an open-source project's value and boundaries before installing**: Current evidence comes mainly from project documentation. Evidence: `README.md` Claim: `clm_0002` supported 0.86

## What It Can Do

- **Project Knowledge Preview** (Previewable before install): The project can be read and explained, but current evidence is not enough to confirm installable capabilities or a runtime entrypoint. Evidence: `README.md`, `docs/AGENTS.md`, `packages/cli/README.md`, `packages/runtime/vendor/README.md` et al. Claim: `clm_0001` supported 0.86

## How to Start

- No stable Quick Start command in the project evidence; this should be left empty rather than fabricated by Doramagic.

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox trial only
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox trial only
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Host AI configuration, Host AI context

### What You Can Trust Now

- **Target-audience signal: Users who want to understand an open-source project's value and boundaries before installing** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Capability exists: Project Knowledge Preview** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md`, `docs/AGENTS.md`, `packages/cli/README.md`, `packages/runtime/vendor/README.md` et al. Claim: `clm_0001` supported 0.86

### What You Cannot Trust Yet

- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `AGENTS.md`, `docs/AGENTS.md`
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.

### What Continuing Will Touch

- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `AGENTS.md`, `docs/AGENTS.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0003` inferred 0.45
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **Project Knowledge Preview**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `README.md`, `docs/AGENTS.md`, `packages/cli/README.md`, `packages/runtime/vendor/README.md` et al. Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 626
- Important-file coverage: 40/626
- Evidence index entries: 64
- Role / Skill entries: 8

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for scriptc, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat scriptc as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for scriptc, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 8 role / Skill / project-doc entries.

- **scriptc** (project_doc): Zero-runtime TypeScript. scriptc compiles ordinary TypeScript into small, fast native executables — no Node, no V8, no JavaScript engine in the binary. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **Docs Site Conventions** (project_doc): This is the scriptc docs site: Next.js App Router + MDX, one topic per src/app/ /page.mdx , standalone from the repo's pnpm workspace it has its own lockfile; pnpm install && pnpm check runs entirely inside docs/ . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/AGENTS.md`
- **scriptc** (project_doc): Compile ordinary TypeScript and JavaScript to small, fast native executables — no Node, no V8, no JavaScript engine in the binary. What compiles behaves byte-for-byte like Node. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/cli/README.md`
- **Vendored third-party code** (project_doc): - Project: https://github.com/ulfjack/ryu - Commit: 4c0618b0e44f7ef027ebae05d2cc7812048f7c8f - License: Apache-2.0 OR BSL-1.0, used under the Boost Software License 1.0 see ryu/LICENSE-Boost Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/runtime/vendor/README.md`
- **⚡️ QuickJS - A mighty JavaScript engine** (project_doc): ⚡️ QuickJS - A mighty JavaScript engine Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/runtime/vendor/quickjs-ng/README.md`
- **Agent Guide** (project_doc): Guidance for agents and humans working on this repository. These conventions apply repo-wide; the docs site under docs/ additionally has its own conventions in docs/AGENTS.md . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `AGENTS.md`
- **Changelog** (project_doc): All notable changes to scriptc will be documented in this file. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CHANGELOG.md`
- **Releasing** (project_doc): Releases are manual, single-commit affairs. The maintainer controls the changelog voice and format. The three npm packages — @scriptc/runtime , @scriptc/compiler , scriptc — always publish together at the same version. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `RELEASING.md`

## Evidence Index

- Indexed 64 evidence entries.

- **scriptc** (documentation): Zero-runtime TypeScript. scriptc compiles ordinary TypeScript into small, fast native executables — no Node, no V8, no JavaScript engine in the binary. Evidence: `README.md`
- **Docs Site Conventions** (documentation): This is the scriptc docs site: Next.js App Router + MDX, one topic per src/app/ /page.mdx , standalone from the repo's pnpm workspace it has its own lockfile; pnpm install && pnpm check runs entirely inside docs/ . Evidence: `docs/AGENTS.md`
- **scriptc** (documentation): Compile ordinary TypeScript and JavaScript to small, fast native executables — no Node, no V8, no JavaScript engine in the binary. What compiles behaves byte-for-byte like Node. Evidence: `packages/cli/README.md`
- **Vendored third-party code** (documentation): - Project: https://github.com/ulfjack/ryu - Commit: 4c0618b0e44f7ef027ebae05d2cc7812048f7c8f - License: Apache-2.0 OR BSL-1.0, used under the Boost Software License 1.0 see ryu/LICENSE-Boost Evidence: `packages/runtime/vendor/README.md`
- **⚡️ QuickJS - A mighty JavaScript engine** (documentation): ⚡️ QuickJS - A mighty JavaScript engine Evidence: `packages/runtime/vendor/quickjs-ng/README.md`
- **Agent Guide** (documentation): Guidance for agents and humans working on this repository. These conventions apply repo-wide; the docs site under docs/ additionally has its own conventions in docs/AGENTS.md . Evidence: `AGENTS.md`
- **Package** (package_manifest): { "name": "@scriptc/docs", "version": "0.0.0", "private": true, "type": "module", "packageManager": "pnpm@10.23.0", "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "typecheck": "tsc --noEmit", "check": "pnpm typecheck && pnpm build" }, "dependencies": { "@mdx-js/loader": "^3", "@mdx-js/react": "^3", "@next/mdx": "^16.1.6", "clsx": "^2.1.1", "geist": "^1.7.0", "next": "^16.2.9", "next-themes": "^0.4.6", "radix-ui": "^1.4.3", "react": "^19", "react-dom": "^19", "remark-gfm": "^4.0.1", "shiki": "^4.0.2", "tailwind-merge": "^3.5.0", "tailwindcss-animate": "^1.0.7" }, "devDependencies": { "@tailwindcss/postcss": "^4", "@types/mdx": "^2", "@types/node": "^22", "@type… Evidence: `docs/package.json`
- **Package** (package_manifest): { "name": "scriptc-monorepo", "private": true, "engines": { "node": " =24.0.0" }, "scripts": { "build": "pnpm -r --filter \"./packages/ \" run build", "build:fresh": "rm -rf packages/compiler/dist packages/cli/dist node modules/.cache/scriptc-tsc && pnpm build", "test": "vitest run", "test:cache-identity": "node tests/harness/cache-identity.mjs", "test:watch": "vitest", "lint": "eslint packages/compiler/src packages/cli/src", "manifest": "tsx scripts/surface-manifest.mjs", "scriptc": "tsx packages/cli/src/main.ts" }, "devDependencies": { "@types/node": "^24.0.0", "eslint": "^9.20.0", "tsx": "^4.19.0", "typescript": "5.9.3", "typescript-eslint": "^8.24.0", "vitest": "^3.0.0" } } Evidence: `package.json`
- **Package** (package_manifest): { "name": "scriptc", "version": "0.0.17", "description": "Compile ordinary TypeScript and JavaScript to small, fast native executables — no Node, no V8, no JavaScript engine in the binary", "license": "Apache-2.0", "homepage": "https://scriptc.dev", "repository": { "type": "git", "url": "git+https://github.com/vercel-labs/scriptc.git", "directory": "packages/cli" }, "type": "module", "bin": { "scriptc": "dist/main.js" }, "files": "dist" , "engines": { "node": " =20" }, "scripts": { "build": "node ../../node modules/typescript/bin/tsc -p tsconfig.json" }, "dependencies": { "@scriptc/compiler": "workspace: " } } Evidence: `packages/cli/package.json`
- **Package** (package_manifest): { "type": "commonjs" } Evidence: `packages/compiler/ambient/package.json`
- **Package** (package_manifest): { "name": "@scriptc/compiler", "version": "0.0.17", "description": "The scriptc compiler — TypeScript/JavaScript frontend, typed IR, LLVM and C backends", "license": "Apache-2.0", "homepage": "https://scriptc.dev", "repository": { "type": "git", "url": "git+https://github.com/vercel-labs/scriptc.git", "directory": "packages/compiler" }, "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { ".": "./dist/index.js", "./scriptc.d.ts": "./ambient/scriptc.d.ts", "./scriptc-overrides.d.ts": "./ambient/scriptc-overrides.d.ts", "./scriptc-node-fallback.d.ts": "./ambient/scriptc-node-fallback.d.ts", "./surface-manifest.json": "./surface-manifest.json" }, "files": "dist",… Evidence: `packages/compiler/package.json`
- **Package** (package_manifest): { "name": "@scriptc/runtime", "version": "0.0.17", "description": "scriptc native runtime — C sources, compiled into every scriptc binary", "license": "Apache-2.0", "homepage": "https://scriptc.dev", "repository": { "type": "git", "url": "git+https://github.com/vercel-labs/scriptc.git", "directory": "packages/runtime" }, "files": "src", "vendor" , "publishConfig": { "access": "public" }, "scripts": { "build": "true" } } Evidence: `packages/runtime/package.json`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `LICENSE`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `packages/cli/LICENSE`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `packages/compiler/LICENSE`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `packages/runtime/LICENSE`
- **License** (source_file): Mbed TLS files are provided under a dual Apache-2.0 https://spdx.org/licenses/Apache-2.0.html OR GPL-2.0-or-later https://spdx.org/licenses/GPL-2.0-or-later.html license. This means that users may choose which of these licenses they take the code under. Evidence: `packages/runtime/vendor/mbedtls/LICENSE`
- **License** (source_file): Copyright c 2017-2026 Fabrice Bellard Copyright c 2017-2024 Charlie Gordon Copyright c 2023-2026 Ben Noordhuis Copyright c 2023-2026 Saúl Ibarra Corretgé Evidence: `packages/runtime/vendor/quickjs-ng/LICENSE`
- **License** (source_file): C 1995-2022 Jean-loup Gailly and Mark Adler Evidence: `packages/runtime/vendor/zlib/LICENSE`
- **Surface Manifest** (structured_config): { "schemaVersion": 1, "compilerVersion": "0.0.17", "coverage": "Entries are projected mechanically from the compiler's own decision tables: the diagnostics registry, the unsupported-syntax dispatch tables, the stdlib and node-builtin lowering tables, and the supported-builtin-module list. Nothing is hand-maintained; the manifest regenerates byte-identically from the source tree at this version.", "Absence from this manifest means 'not projected', never 'unsupported'. Surfaces lowered through dedicated code paths rather than tables are not yet projected: console, JSON, Promise/async and the timer surface, the net/http/tls/https/dgram/dns/assert/test/stream/readline module member surfaces, te… Evidence: `packages/compiler/surface-manifest.json`
- **CLI Reference** (source_file): The CLI has three commands. scriptc --help prints this same surface. Evidence: `docs/src/app/cli/page.mdx`
- **npm Dependencies** (source_file): npm packages are the dynamic frontier: their shipped JavaScript is untyped, minified, and written against V8. scriptc's answer is the dynamic island — an embedded JavaScript engine quickjs-ng https://github.com/quickjs-ng/quickjs , ~620KB that executes dependency code inside your binary, opted in with --dynamic , with every value validated as it crosses back into static code. Evidence: `docs/src/app/dependencies/page.mdx`
- **Native FFI** (source_file): Outbound FFI lets statically compiled TypeScript call C ABI symbols directly. A strict JSON manifest connects a signature-only TypeScript declaration to a native symbol and supplies the archives or objects that resolve it at link time. There is no runtime symbol lookup and no JavaScript engine at the boundary. Evidence: `docs/src/app/ffi/page.mdx`
- **How It Works** (source_file): 1. Frontend — the real TypeScript compiler parses and type-checks your program against es2025 plus @types/node when your project has it , honoring your tsconfig.json for checker strictness. The frontend then lowers the checked AST into a typed intermediate representation, using tsc's own type and narrowing answers to drive every decision. A construct with no lowering is a precise diagnostic at this stage — never a miscompile later. 2. Typed IR — the only interface between the ends: a validated, serializable representation --emit-ir writes it as JSON . Types are concrete here; generics have been monomorphized, unions are tagged values, closures have explicit captures. 3. Backends — the LLVM… Evidence: `docs/src/app/how-it-works/page.mdx`
- **Introduction** (source_file): scriptc compiles ordinary TypeScript into small, fast native executables — no Node, no V8, no JavaScript engine in the binary. No changes to your code: no annotations, no dialect, no special standard library. The same TypeScript you run on Node, type-checked by the real TypeScript compiler, compiled to native code. What compiles behaves byte-for-byte like Node. Evidence: `docs/src/app/introduction/page.mdx`
- **Limitations** (source_file): Honesty is the product. The static surface is large but not total, and a few behaviors diverge from Node by design . This page is the plain-language version; scriptc coverage on your program is the real answer for your code, and every blocker it reports is specific and coded. Nothing on this page is silent: everything here is either a compile error or a documented, numbered divergence. Evidence: `docs/src/app/limitations/page.mdx`
- **Page** (source_file): import Link from "next/link"; import { Code } from "@/components/code"; import { siteName, githubUrl } from "@/lib/site"; ⋮---- function TerminalPane ⋮---- export default function Home Evidence: `docs/src/app/page.tsx`
- **Platform Support** (source_file): The primary platform. clang — preinstalled with the Xcode Command Line Tools — is the only system dependency for producing binaries. The full surface is supported: the language, the stdlib, the Node API surface including the server stack, --dynamic , and the sanitizer lane. Evidence: `docs/src/app/platforms/page.mdx`
- **Quickstart** (source_file): Install the CLI from npm and compile your first binary in a couple of minutes. Evidence: `docs/src/app/quickstart/page.mdx`
- **Main** (source_file): import { spawn } from "node:child process"; import { readFileSync, rmSync } from "node:fs"; import { basename, dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; import { parseArgs } from "node:util"; import { analyze, compile, compileC, compileLibrary, renderAll, renderCoverage, resolveProvenanceSources, setProvenanceSources } from "@scriptc/compiler"; import { defaultExecutableName } from "./paths.js"; ⋮---- function version : string ⋮---- class CliExit extends Error ⋮---- constructor readonly code: number ⋮---- function fail msg: string : never ⋮---- function parseCli : ReturnType ⋮---- const build = async : Promise = Evidence: `packages/cli/src/main.ts`
- **Paths** (source_file): import { buildTargetPlatform } from "@scriptc/compiler"; ⋮---- export function defaultExecutableName stem: string, platform: string = buildTargetPlatform : string Evidence: `packages/cli/src/paths.ts`
- **Cc** (source_file): import { execFile } from "node:child process"; import { createHash } from "node:crypto"; import { createRequire } from "node:module"; import { chmod, copyFile, mkdir, mkdtemp, readdir, readFile, rename, rm, stat, unlink, utimes, writeFile } from "node:fs/promises"; import { availableParallelism, tmpdir } from "node:os"; import { basename, dirname, join } from "node:path"; import { promisify } from "node:util"; ⋮---- export interface CcOptions { cPath: string; outPath: string; sanitize?: boolean; linkInputs?: readonly string ; systemLibraries?: readonly string ; dynamic?: boolean; regex?: boolean; fetch?: boolean; netIsland?: boolean; zlib?: boolean; assert?: boolean; inspect?: boolean; dynI… Evidence: `packages/compiler/src/backend/cc.ts`
- **Emit Async** (source_file): import type { CEmitter } from "./emitter.js"; import { mangleArgPack, mangleAsyncSpawn, mangleChildDataThunk, mangleChildExitThunk, mangleCloseBindThunk, mangleCloseOverrideWrap, mangleConnectSockThunk, mangleDgramMsgThunk, mangleDnsLookupThunk, mangleField, mangleFunction, mangleGenDrop, mangleGenResThunk, mangleGenSpawn, mangleLocal, mangleRaceThunk, mangleRawParam, mangleNetLookupAnswerThunk, mangleEmitterInvokeThunk, mangleStreamCbThunk, mangleStreamDoneFn, mangleRecordNew, mangleRecordRelease, mangleRecordStruct, mangleResolveThunk, mangleSniAnswerThunk, mangleTrampoline } from "../mangle.js"; import { cDecl, cType, releaseCallC, retainCallC, vAdapters } from "./emit-types.js"; import… Evidence: `packages/compiler/src/backend/emission/emit-async.ts`
- **Emit Exprs** (source_file): import type { CEmitter, Temp } from "./emitter.js"; import { arrayOf, BOOL, BYTES U8, bytesOf, canMarshalFuncIntoIsland, CHILDSTREAM T, DYN, F64, IrExpr, IrRecordShape, IrType, islandPromisePayloadTag, isRefCounted, isUnitType, MAY THROW LIB FNS, RUNTIME ERROR CLASSES, STRING, typeEquals } from "../../ir/nodes.js"; import { boxAccess, BYTES NUM KIND C, BYTES NUM VAR C, bytesElemKindC, cDecl, cFnPtrCast, cNumberLiteral, cStringLiteral, cType, DV GET KIND C, DV SET KIND C, elemAccess, mapKeyAccess, mapKeyKindC, mapValKindC, retainCallC, vAdapters } from "./emit-types.js"; import { mangleClassNew, mangleClassRetain, mangleClassStruct, mangleField, mangleFnClosure, mangleFunction, mangleGlobal,… Evidence: `packages/compiler/src/backend/emission/emit-exprs.ts`
- **Emit Island** (source_file): import { deflateRawSync } from "node:zlib"; import type { CEmitter } from "./emitter.js"; import { cDecl, cFnPtrCast, cStringLiteral, releaseCallC } from "./emit-types.js"; import { IrType, islandCallbackRet, NPM COMPRESS MIN, typeKey } from "../../ir/nodes.js"; ⋮---- export function emitNpmEmbedding E: CEmitter, out: string : void ⋮---- const emitChunked = name: string, bytes: Buffer, comment?: string : void = ⋮---- const store = text: string : ⋮---- const s = t: string ⋮---- / The host-call adapter for closures of a given arity, return kind — see islandAdapters. argv cells are BORROWED by the wrapper; the closure ABI consumes +1 each param, so the adapter retains them in. A jsval-returnin… Evidence: `packages/compiler/src/backend/emission/emit-island.ts`
- **Emit Stmts** (source_file): import type { CEmitter, ScopeEntry } from "./emitter.js"; import type { IrFunction } from "../../ir/nodes.js"; import { mangleField, mangleGlobal, mangleLocal, mangleRawParam } from "../mangle.js"; import { BOOL, CAUGHT, IrExpr, IrStmt, RUNTIME ERROR CLASSES, isRefCounted } from "../../ir/nodes.js"; import { boxAccess, cDecl, cStringLiteral, elemAccess, vAdapters } from "./emit-types.js"; import { OVERFLOW MEMBER } from "./emit-shapes.js"; ⋮---- export function emitFunction E: CEmitter, fn: IrFunction : void ⋮---- // Function scope owns refcounted params callees own their params . // Boxed params: allocate the shared binding and move the raw value in. ⋮---- // Implicit exit of a void functi… Evidence: `packages/compiler/src/backend/emission/emit-stmts.ts`
- **Emit Types** (source_file): import type { IrType } from "../../ir/nodes.js"; import { RUNTIME EMITTER CLASS, RUNTIME ERROR CLASSES, RUNTIME STREAM CLASSES } from "../../ir/nodes.js"; import { mangleClassRelease, mangleClassRetain, mangleClassStruct, mangleRecordRelease, mangleRecordRetain, mangleRecordStruct, } from "../mangle.js"; ⋮---- export function cType t: IrType : string ⋮---- export function retainCallC type: IrType, expr: string : string ⋮---- export function releaseCallC type: IrType, expr: string : string ⋮---- export function boxKindC t: IrType : string ⋮---- export function vAdapters t: IrType : ⋮---- export function boxAccess t: IrType : "f64" "bool" "ref" ⋮---- export function cFnPtrCast ft: IrType & ⋮-… Evidence: `packages/compiler/src/backend/emission/emit-types.ts`
- **Emitter** (source_file): import type { IrGlobal, IrRecordShape, IrExpr, IrFfiImport, IrFunction, IrLocal, IrModule, IrStmt, IrType, IrUnionDef, SrcLoc, } from "../../ir/nodes.js"; import { funcOf, isRefCounted, isUnitType, mapOf, moduleEmbedsCompressedNpm, moduleUsesDgram, moduleUsesDynInvoke, moduleEmbedsBuiltin, moduleUsesFetch, moduleUsesFsWatch, moduleUsesHttp2, moduleUsesHttpServer, moduleUsesNet, moduleUsesNodeTest, moduleUsesProcessEvents, moduleUsesStream, RUNTIME EMITTER CLASS, STRING, VOID } from "../../ir/nodes.js"; import { mangleAsyncSpawn, mangleGenSpawn, mangleClassObj, mangleField, mangleGlobal, mangleFnClosure, mangleFunction, mangleLocal, mangleRawParam, mangleVtSlot, mangleWrapper, } from "../man… Evidence: `packages/compiler/src/backend/emission/emitter.ts`
- **Emitter** (source_file): import type { IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc, } from "../../ir/nodes.js"; import { canMarshalFuncIntoIsland, CAUGHT, DYN, F64, islandCallbackRet, islandPromisePayloadTag, isRefCounted, isUnitType, MAY THROW LIB FNS, moduleUsesDynInvoke, moduleUsesFetch, moduleUsesFsWatch, moduleUsesHttpServer, moduleUsesNet, moduleUsesProcessEvents, moduleUsesStream, RUNTIME EMITTER CLASS, RUNTIME ERROR CLASSES, RUNTIME STREAM CLASSES, STRING, typeEquals, typeKey, VOID } from "../../ir/nodes.js"; import { computeMayThrow } from "../emission/may-throw.js"; import { mangleArgPack, mangleAsyncSpawn, mangleClassNew, mangleClassObj,… Evidence: `packages/compiler/src/backend/llvm/emitter.ts`
- **Profile** (source_file): import { readFileSync, statSync } from "node:fs"; import { dirname, resolve } from "node:path"; import { ffiProfileDiag, type ScrDiagnostic } from "../diagnostics/diagnostic.js"; ⋮---- export type FfiParamClass = typeof FFI PARAM CLASSES number ; export type FfiReturnClass = typeof FFI RETURN CLASSES number ; ⋮---- export interface FfiFunction { name: string; symbol: string; params: FfiParamClass ; returns: FfiReturnClass; } ⋮---- export interface FfiProfile { ffiFormat: 1; functions: FfiFunction ; libraries: string ; systemLibraries: string ; } ⋮---- class FfiProfileError extends Error ⋮---- constructor readonly detail: string ⋮---- function rejectUnknownKeys obj: object, path: string, kno… Evidence: `packages/compiler/src/ffi/profile.ts`
- **Lower Emitter** (source_file): import type { Lowerer } from "./lowerer.js"; import { dynFallbackType, newFnCtx } from "./lowerer.js"; import type { ClassInfo } from "./lower-classes.js"; import { isJsSourceFile, locOf } from "../program.js"; import { arrayOf, BOOL, canBoxFuncIntoDyn, canConvertToDyn, DYN, F64, IrExpr, IrFunction, IrLocal, IrParam, IrStmt, IrType, isUnitType, STRING, SrcLoc, typeEquals, typeKey, VOID } from "../../ir/nodes.js"; import { streamForcedTuple, streamSidesOf } from "./lower-stream.js"; ⋮---- export function emitterRooted L: Lowerer, info: ClassInfo undefined null : boolean ⋮---- interface EventSig { tuple: IrType ; fromEmit: boolean; conflict: string null; dynListener: boolean; } ⋮---- function… Evidence: `packages/compiler/src/frontend/lowering/lower-emitter.ts`
- **Program** (source_file): import { builtinModules } from "node:module"; import { dirname, resolve } from "node:path"; ⋮---- import type { ScrDiagnostic } from "../diagnostics/diagnostic.js"; import { strictNullChecksFloorDiag, tscPassthroughDiag, unsupportedDiag, } from "../diagnostics/diagnostic.js"; import { isNodeModulesPath, nearestPkgJsonPath, projectDtsRuntimeSibling, resolveBareModule, resolveProjectImport, resolveRelativeModule, resolveTypeDirective, setProjectRealm } from "./resolve.js"; import { probeNodeImportRefusal, probeNodeRequireRefusal } from "./npm.js"; import { isNpmStaticPackage, npmStaticActive, npmStaticFsShadow, npmStaticPackageOfPath, reportNpmStaticOffender, setNpmStaticPackages } from "./np… Evidence: `packages/compiler/src/frontend/program.ts`
- **Ast** (source_file): import type { AccessorDeclaration, GetAccessorDeclaration, Modifier, Node, NodeArray, ParameterDeclaration, PropertySignatureDeclaration, SetAccessorDeclaration, SignatureDeclaration, SourceFile, StringLiteralLikeNode, } from "typescript/unstable/ast"; import { isAccessorDeclaration, isBindingElement, isGetAccessorDeclaration, isJSDocSignature, isParameterDeclaration, isPropertySignatureDeclaration, isSetAccessorDeclaration, isSignatureDeclaration, isStringLiteralLikeNode, isVariableDeclaration, isVariableDeclarationList, isVariableStatement, } from "typescript/unstable/ast/is"; import type { Diagnostic } from "typescript/unstable/sync"; import { ModifierFlags, SyntaxKind } from "./enums.js… Evidence: `packages/compiler/src/frontend/ts7/ast.ts`
- **Checker** (source_file): import type { Node, SourceFile } from "typescript/unstable/ast"; import type { Checker, IndexInfo, Project, Signature, Symbol as Ts7Symbol, Type, TypePredicate, TypeReference, } from "typescript/unstable/sync"; import { walkPreorder } from "./ast.js"; import { SignatureKind, TypeFlags } from "./enums.js"; ⋮---- function withPanicFence chunk: readonly I , call: chunk: I = readonly O undefined , : O undefined ⋮---- function chunked items: readonly T , fetch: chunk: readonly T = readonly R : R ⋮---- function collectNodes sf: SourceFile : Node ⋮---- export class CheckerFacade ⋮---- constructor ⋮---- private requireProject : Project ⋮---- declarationsOf symbol: Ts7Symbol : readonly Node ⋮---- va… Evidence: `packages/compiler/src/frontend/ts7/checker.ts`
- **Program** (source_file): import { existsSync, readFileSync, statSync, writeFileSync } from "node:fs"; import { dirname, join, resolve } from "node:path"; import { API } from "typescript/unstable/sync"; import type { CompilerOptions, Diagnostic, Project, Snapshot, } from "typescript/unstable/sync"; import type { SourceFile } from "typescript/unstable/ast"; import { CheckerFacade } from "./checker.js"; import { enumKeyOf, ModuleKind, ModuleResolutionKind, ScriptTarget } from "./enums.js"; import { tsgoPath } from "../shared.js"; ⋮---- export type Ts7CompilerOptions = CompilerOptions; ⋮---- function serializeOptions options: Ts7CompilerOptions : Record ⋮---- export class Ts7Host ⋮---- constructor options?: { cwd?: str… Evidence: `packages/compiler/src/frontend/ts7/program.ts`
- **Types** (source_file): import type { IrRecordShape, IrType, IrUnionDef } from "../ir/nodes.js"; import { arrayOf, BOOL, bytesOf, canConvertToDyn, CHILD T, DYN, F64, funcOf, isSupportedIndexValue, isSupportedMapKey, isSupportedMapValue, isSupportedSetElem, isUnitType, JSVAL, mapOf, NULL T, PROCSTREAM T, RUNTIME EMITTER CLASS, RUNTIME ERROR CLASSES, RUNTIME STREAM CLASSES, setOf, STRING, SYMBOL T, typeEquals, typeKey, UNDEFINED T, VOID } from "../ir/nodes.js"; ⋮---- import { isJsSourceFile, isNodeTypesPath } from "./program.js"; import { accessorSlotProp } from "../ir/nodes.js"; ⋮---- export class ShapeRegistry ⋮---- private keyOf fields: ⋮---- / The shape id a back-reference to an in-progress type resolves to: reu… Evidence: `packages/compiler/src/frontend/types.ts`
- **Index** (source_file): import { mkdir, rm, writeFile } from "node:fs/promises"; import { basename, dirname, join, resolve } from "node:path"; import { CcCompileError, compileC, compileLibArchive, resolveCc, targetPlatform } from "./backend/cc.js"; import { emitModule } from "./backend/emission/emitter.js"; import { emitLlvmModule, LlvmUnsupportedError } from "./backend/llvm/emitter.js"; import { checkerPanicDiag, ffiNativeBuildDiag, libAsyncExportDiag, libAsyncSurfaceDiag, libExportUnresolvedDiag, libGenericExportDiag, libIntBoundaryDiag, libNpmIneligibleDiag, libUnmappableSignatureDiag, iceDiag, isCheckerPanic, LIB INBOUND BYTES TRAP CODE, LIB RUNTIME TRAP CODES, type ScrDiagnostic } from "./diagnostics/diagnost… Evidence: `packages/compiler/src/index.ts`
- **Profile** (source_file): import { readFileSync } from "node:fs"; import { dirname, isAbsolute, resolve } from "node:path"; import { libProfileDiag, type ScrDiagnostic } from "../diagnostics/diagnostic.js"; import { resolveLibraryFences, type LibraryFenceDecl, type ResolvedLibraryFence } from "./fence-eval.js"; ⋮---- export type LibIntClass = typeof LIB INT CLASSES number ; ⋮---- export type LibParamClass = typeof LIB PARAM CLASSES number ; export type LibReturnClass = typeof LIB RETURN CLASSES number ; ⋮---- export interface LibraryExportEntry { export: string; symbol: string; params: LibParamClass ; returns: LibReturnClass; } ⋮---- export interface LibrarySidecarConfig { path: string null; wireVersion: number; abi… Evidence: `packages/compiler/src/library/profile.ts`
- **Sidecar Validate** (source_file): type Dict = Record ; ⋮---- function isDict v: unknown : v is Dict ⋮---- export function validateSidecar doc: unknown : string ⋮---- const bad = rule: string, msg: string : void = ⋮---- const claimName = name: unknown, where: string : string null = ⋮---- const walkRef = ref: unknown, where: string, owner: string null, slotPath: string null : void = ⋮---- const visit = name: string, path: string : void = Evidence: `packages/compiler/src/library/sidecar-validate.ts`
- **Sidecar** (source_file): import { Buffer } from "node:buffer"; import { readFileSync } from "node:fs"; import { dirname, isAbsolute, join, relative, sep } from "node:path"; import { fileURLToPath } from "node:url"; import { libSidecarComputedDiag, libSidecarDiag, libSidecarMergedDiag, type ScrDiagnostic } from "../diagnostics/diagnostic.js"; import type { ContractFacts, ContractField, ContractTypeDecl, ContractTypeShape } from "../frontend/lib-contract.js"; import type { SrcLoc } from "../ir/nodes.js"; import type { LibraryProfile, LibrarySidecarConfig } from "./profile.js"; import { BUILD ID SEED, hex16, lengthPrefixedStream, SOURCE HASH SEED, wyhash64 } from "./wyhash.js"; ⋮---- export type TypeRef = { kind: "boo… Evidence: `packages/compiler/src/library/sidecar.ts`
- **Changelog** (documentation): All notable changes to scriptc will be documented in this file. Evidence: `CHANGELOG.md`
- **Releasing** (documentation): Releases are manual, single-commit affairs. The maintainer controls the changelog voice and format. The three npm packages — @scriptc/runtime , @scriptc/compiler , scriptc — always publish together at the same version. Evidence: `RELEASING.md`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "ES2017", "lib": "dom", "dom.iterable", "esnext" , "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "react-jsx", "incremental": true, "plugins": { "name": "next" } , "paths": { "@/ ": "./src/ " } }, "include": " / .mdx", " / .ts", " / .tsx", "next-env.d.ts", ".next/types/ / .ts", ".next/dev/types/ / .ts", ".next-check/types/ / .ts", ".next-check/dev/types/ / .ts" , "exclude": "node modules", ".next", ".next-check" } Evidence: `docs/tsconfig.json`
- **Tsconfig.Base** (structured_config): { "compilerOptions": { "incremental": true, "target": "ES2023", "module": "NodeNext", "moduleResolution": "NodeNext", "lib": "ES2023" , "strict": true, "noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true, "noImplicitOverride": true, "noFallthroughCasesInSwitch": true, "forceConsistentCasingInFileNames": true, "isolatedModules": true, "declaration": true, "sourceMap": true, "skipLibCheck": true } } Evidence: `tsconfig.base.json`
- **Tsconfig** (structured_config): { "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", "tsBuildInfoFile": "../../node modules/.cache/scriptc-tsc/cli.tsbuildinfo" }, "include": "src" } Evidence: `packages/cli/tsconfig.json`
- **Tsconfig** (structured_config): { "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", "tsBuildInfoFile": "../../node modules/.cache/scriptc-tsc/compiler.tsbuildinfo" }, "include": "src" } Evidence: `packages/compiler/tsconfig.json`
- **test-fixture packages are TEST DATA, committed on purpose** (source_file): node modules/ test-fixture packages are TEST DATA, committed on purpose !tests/diagnostics/npm-imports/node modules/ !tests/fixtures/commander-calc/node modules/ !tests/fixtures/npm/node modules/ !tests/corpus/ /node modules/ !tests/fixtures/npm-static/node modules/ !tests/fixtures/npm-static/nested/inner/node modules/ !tests/fixtures/npm/store/ /node modules/ !tests/fixtures/npm/cases/ /node modules/ !tests/library-mode/ /node modules/ !tests/fixtures/provenance/node modules/ !tests/fixtures/fetch/node modules/ !tests/fixtures/gateway-e2e/node modules/ !tests/fixtures/node-types/node modules/ dist/ !tests/fixtures/fetch/node modules/eventsource-parser/dist/ !tests/fixtures/npm/node modules… Evidence: `.gitignore`
- **.node-version** (source_file): 24.15.0 Evidence: `.node-version`
- **docs/.gitignore** (source_file): node modules/ .next/ .next-check/ next-env.d.ts tsconfig.tsbuildinfo Evidence: `docs/.gitignore`
- **Pnpm Workspace** (source_file): packages: overrides: "postcss@ =8.5.10" Evidence: `docs/pnpm-workspace.yaml`
- The remaining 4 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `README.md`, `docs/AGENTS.md`, `packages/cli/README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `README.md`, `docs/AGENTS.md`, `packages/cli/README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Introduction and Three-Tier Compilation Model**: importance `high`
  - source_paths: README.md, docs/src/app/page.tsx, docs/src/app/introduction/page.mdx, docs/src/app/how-it-works/page.mdx, packages/compiler/src/index.ts
- **Frontend and Lowering: TypeScript to Typed IR**: importance `high`
  - source_paths: packages/compiler/src/frontend/program.ts, packages/compiler/src/frontend/types.ts, packages/compiler/src/frontend/ts7/program.ts, packages/compiler/src/frontend/ts7/adapter.ts, packages/compiler/src/frontend/ts7/ast.ts
- **Backend Emitters and C Runtime**: importance `high`
  - source_paths: packages/compiler/src/backend/cc.ts, packages/compiler/src/backend/emission/emitter.ts, packages/compiler/src/backend/emission/emit-exprs.ts, packages/compiler/src/backend/emission/emit-stmts.ts, packages/compiler/src/backend/emission/emit-async.ts
- **CLI, Operations, Escape Hatches, and Platforms**: importance `high`
  - source_paths: packages/cli/src/main.ts, packages/cli/src/paths.ts, packages/compiler/src/ffi/profile.ts, packages/compiler/surface-manifest.json, packages/compiler/src/library/sidecar.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `20c3a6c27da4807f607ebe496663842b67e87f0e`
- inspected_files: `README.md`, `package.json`, `pnpm-lock.yaml`, `docs/AGENTS.md`, `docs/package.json`, `docs/pnpm-lock.yaml`, `docs/pnpm-workspace.yaml`, `docs/src/app/cli/page.mdx`, `docs/src/app/coverage/page.mdx`, `docs/src/app/dependencies/page.mdx`, `docs/src/app/ffi/page.mdx`, `docs/src/app/how-it-works/page.mdx`, `docs/src/app/introduction/page.mdx`, `docs/src/app/limitations/page.mdx`, `docs/src/app/platforms/page.mdx`, `docs/src/app/quickstart/page.mdx`, `docs/src/app/robots.ts`, `docs/src/app/sitemap.ts`, `docs/src/lib/docs-navigation.ts`, `docs/src/lib/github.ts`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://news.ycombinator.com/item?id=49063175
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://news.ycombinator.com/item?id=49063175
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://news.ycombinator.com/item?id=49063175
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://news.ycombinator.com/item?id=49063175
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://news.ycombinator.com/item?id=49063175
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
