# deepsec - 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 deepsec. 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

- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0003` supported 0.86
- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `packages/deepsec/SKILL.md` Claim: `clm_0004` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `packages/deepsec/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0002` supported 0.86

## How to Start

- `npx deepsec init       # creates .deepsec/ with this repo as the first project` Evidence: `README.md` Claim: `clm_0005` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (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_0003` supported 0.86
- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `packages/deepsec/SKILL.md` Claim: `clm_0004` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (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: `packages/deepsec/SKILL.md` Claim: `clm_0001` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (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` Claim: `clm_0002` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0005` 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: `CLAUDE.md`, `packages/deepsec/SKILL.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.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **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: `CLAUDE.md`, `packages/deepsec/SKILL.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `.deepsec/data/deepsec/INFO.md`, `.deepsec/data/deepsec/files/.github/workflows/deepsec.yml.json`, `.deepsec/data/deepsec/files/packages/deepsec/src/preflight.ts.json`, `.deepsec/data/deepsec/files/packages/deepsec/src/sandbox/setup.ts.json` et al.
- **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.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **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.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **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_0006` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0007` supported 0.86
- **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.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## 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

- **AI Skill / Agent Instruction Asset Library**: 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: `packages/deepsec/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0002` supported 0.86

### Context Scale

- Total files: 665
- Important-file coverage: 40/665
- Evidence index entries: 78
- Role / Skill entries: 1

### 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 deepsec, 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 deepsec 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 deepsec, 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 1 role / Skill / project-doc entries.

- **deepsec** (skill): Use deepsec an AI-powered vulnerability scanner — running scans, configuring projects, writing matchers, and authoring plugins. Activates when the user asks how to scan, configure, or extend deepsec in a project that has deepsec installed. Activation hint: When the user's task is highly relevant to the workflow described by “deepsec”, use it for a pre-install experience first, then decide whether to install. Evidence: `packages/deepsec/SKILL.md`

## Evidence Index

- Indexed 78 evidence entries.

- **deepsec** (documentation): This directory holds the deepsec https://www.npmjs.com/package/deepsec config for the parent repo. Checked into git so teammates inherit project context auth shape, threat model, custom matchers AND the per-file investigation cache — committing data/ /files/ is what lets CI re-investigate only the files in the PR diff instead of starting from scratch every run. Evidence: `.deepsec/README.md`
- **deepsec** (documentation): deepsec an agent-powered vulnerability scanner that you can run in your own infrastructure, optimized to perform on-demand review of all code in existing large-scale repos. Evidence: `README.md`
- **Samples** (documentation): Copy-paste starting points showing how deepsec looks in practice. Evidence: `samples/README.md`
- **Getting Started** (documentation): This is a Next.js https://nextjs.org project bootstrapped with create-next-app https://nextjs.org/docs/app/api-reference/cli/create-next-app . Evidence: `packages/website/README.md`
- **webapp sample** (documentation): A fictional inventory webapp "Acme" with deepsec wired up. This is the rich reference — a worked plugin + custom matchers + filled-in INFO.md showing what a scanning workspace looks like once it's been loved on for a while. Evidence: `samples/webapp/README.md`
- **Package** (package_manifest): { "name": "deepsec-workspace", "version": "0.1.0", "private": true, "description": "deepsec scanning workspace", "type": "module", "scripts": { "deepsec": "pnpm -s -C ../packages/deepsec bundle && pnpm exec deepsec" }, "dependencies": { "deepsec": "link:../packages/deepsec" } } Evidence: `.deepsec/package.json`
- **Package** (package_manifest): { "name": "deepsec-monorepo", "version": "0.1.0", "private": true, "type": "module", "description": "AI-powered vulnerability scanner for any codebase", "license": "Apache-2.0", "engines": { "node": " =22" }, "packageManager": "pnpm@8.15.9", "repository": { "type": "git", "url": "https://github.com/vercel-labs/deepsec" }, "scripts": { "build": "pnpm -r build", "bundle": "pnpm --filter deepsec bundle", "deepsec": "tsx packages/deepsec/src/cli.ts", "test": "vitest run", "test:unit": "vitest run --project core --project scanner --project processor --project cli", "test:e2e": "vitest run --project e2e", "test:e2e:live": "LIVE AGENT=1 vitest run --project e2e", "test:bundle": "pnpm bundle && vit… Evidence: `package.json`
- **Package** (package_manifest): { "name": "@deepsec/core", "version": "0.1.0", "private": true, "type": "module", "main": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "tsc" }, "dependencies": { "zod": "^3.24.0" } } Evidence: `packages/core/package.json`
- **Package** (package_manifest): { "name": "deepsec", "version": "2.2.3", "description": "AI-powered vulnerability scanner for any codebase", "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/vercel-labs/deepsec" }, "type": "module", "bin": { "deepsec": "./dist/cli.mjs" }, "exports": { ".": "./dist/cli.mjs", "./config": { "types": "./dist/config.d.ts", "import": "./dist/config.mjs" } }, "files": "dist", "README.md", "LICENSE", "NOTICE", "SKILL.md" , "scripts": { "build": "tsc --noEmit", "bundle": "pnpm --filter @deepsec/core --filter @deepsec/scanner build && node build.mjs", "prepack": "pnpm bundle", "prepublishOnly": "pnpm -w validate && node -e \"const fs=require 'node:fs' ;for const f o… Evidence: `packages/deepsec/package.json`
- **Package** (package_manifest): { "name": "@deepsec/processor", "version": "0.1.0", "private": true, "type": "module", "main": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "tsc" }, "dependencies": { "@anthropic-ai/claude-agent-sdk": "^0.3.158", "@deepsec/core": "workspace: ", "@deepsec/scanner": "workspace: ", "@earendil-works/pi-coding-agent": "0.79.10", "@openai/codex": "^0.144.0", "@openai/codex-sdk": "^0.144.0", "jsonrepair": "^3.14.0" } } Evidence: `packages/processor/package.json`
- **Package** (package_manifest): { "name": "@deepsec/scanner", "version": "0.1.0", "private": true, "type": "module", "main": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "tsc" }, "dependencies": { "@deepsec/core": "workspace: ", "glob": "^11.0.0", "minimatch": "^10.0.0" } } Evidence: `packages/scanner/package.json`
- **Package** (package_manifest): { "name": "website", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "eslint", "postinstall": "fumadocs-mdx" }, "dependencies": { "@vercel/analytics": "2.0.1", "@vercel/geistdocs": "1.8.0", "@vercel/speed-insights": "2.0.0", "feed": "^5.2.1", "fumadocs-mdx": "14.0.4", "next": "16.2.6", "react": "19.2.6", "react-dom": "19.2.6" }, "devDependencies": { "@tailwindcss/postcss": "^4.3.0", "@types/mdx": "^2.0.14", "@types/node": "^25.9.1", "@types/react": "^19.2.15", "@types/react-dom": "^19.2.3", "eslint": "^9", "eslint-config-next": "16.2.6", "postcss": "^8.5.19", "typescript": "^5" }, "pnpm": { "overrides": { "postcss@ =… Evidence: `packages/website/package.json`
- **Package** (package_manifest): { "name": "deepsec-workspace-sample", "version": "0.1.0", "private": true, "description": "deepsec workspace for the webapp sample.", "type": "module", "dependencies": { "deepsec": "^0.1.0" } } Evidence: `samples/webapp/package.json`
- **Agent setup** (documentation): This is a deepsec scanning workspace. Each registered project has its own setup prompt at data/ /SETUP.md — open the relevant one when asked to set a project up. Evidence: `.deepsec/AGENTS.md`
- **CLAUDE.md** (documentation): Pointer file for Claude Code working in this repo. User-facing docs are in README.md ./README.md ; contributor docs in CONTRIBUTING.md ./CONTRIBUTING.md . Read those first. Evidence: `CLAUDE.md`
- **Pipeline** (documentation): Each stage is a separate CLI subcommand and reads/writes a consistent on-disk representation. Stages are idempotent: re-running merges new information rather than overwriting. Evidence: `docs/architecture.md`
- **project.json — ProjectConfig** (documentation): data/ is deepsec's on-disk state. Each project owns a subdirectory; the files inside are append-only across runs. Evidence: `docs/data-layout.md`
- **Contributing to deepsec** (documentation): The most useful contributions are new matchers and new plugins . Both have dedicated guides: Evidence: `CONTRIBUTING.md`
- **deepsec** (skill_instruction): deepsec is an AI-powered vulnerability scanner. This skill activates when deepsec ships inside node modules/ — typically because the user ran npx deepsec … which caches the package locally . In the more common dedicated-git setup the user works inside a clone of vercel-labs/deepsec and the same docs sit at docs/ from the repo root — read those instead when this skill fires from outside a node modules. Evidence: `packages/deepsec/SKILL.md`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `LICENSE`
- **Top-level fields** (documentation): deepsec reads deepsec.config.{ts,mjs,js,cjs} from the current working directory, walking up. The CLI inherits whatever the file declares. Evidence: `docs/configuration.md`
- **How should I install deepsec?** (documentation): deepsec lives in a .deepsec/ directory at the root of the repo you want to scan, checked into git so teammates inherit project context. From the codebase's repo root: Evidence: `docs/faq.md`
- **Install** (documentation): Requires Node.js 22+ . The recipe below uses pnpm; npm and yarn work the same way. Evidence: `docs/getting-started.md`
- **CLI selection** (documentation): deepsec talks to LLMs through interchangeable agent backends: Evidence: `docs/models.md`
- **Where to put your plugin** (documentation): A deepsec plugin can fill any of five slots: Evidence: `docs/plugins.md`
- **How it differs from a full scan** (documentation): deepsec process has a direct-invocation mode for reviewing a specific set of files — typically the files changed in a pull request. This is the right tool when you want a fast, scoped read of changed code in CI, rather than a whole-repo audit. Evidence: `docs/reviewing-changes.md`
- **TypeScript / JavaScript Node, Bun, Deno, Workers** (documentation): Canonical list of frameworks and ecosystems deepsec recognizes out of the box. Each entry tells you three things: Evidence: `docs/supported-tech.md`
- **AI Gateway** (documentation): deepsec uses two Vercel products. Most people only need the first. Evidence: `docs/vercel-setup.md`
- **When to write one** (documentation): This doc is for users running deepsec inside a .deepsec/ workspace — i.e. you ran npx deepsec init , deepsec is installed in node modules/ , and you have a data/ / directory with at least one scan in it. The matchers you write here live in your config; they ship alongside deepsec's built-ins for the projects in this workspace. Evidence: `docs/writing-matchers.md`
- **Schemas.Ts** (structured_config): { "filePath": "packages/core/src/schemas.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "insecure-crypto", "lineNumbers": 23 , "snippet": " vulnSlug: z.string ,\n title: z.string ,\n description: z.string ,\n lineNumbers: z.array z.number ,\n recommendation: z.string ,", "matchedPattern": "weak cipher algorithm" } , "lastScannedAt": "2026-05-06T21:46:56.474Z", "lastScannedRunId": "20260506214655-aa977d40dc0c6524", "fileHash": "f417d3f14d073cfb56db12dc1c2df3afff3d0fa5cdda01ca0347ee2747d45ca7", "findings": , "analysisHistory": { "runId": "20260502160808-9bbd", "investigatedAt": "2026-05-02T16:13:47.921Z", "durationMs": 242148, "durationApiMs": 240425, "agentType": "claude-agent-sdk"… Evidence: `.deepsec/data/deepsec/files/packages/core/src/schemas.ts.json`
- **Types.Ts** (structured_config): { "filePath": "packages/core/src/types.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "insecure-crypto", "lineNumbers": 121 , "snippet": " vulnSlug: string;\n title: string;\n description: string;\n lineNumbers: number ;\n recommendation: string;", "matchedPattern": "weak cipher algorithm" }, { "vulnSlug": "insecure-crypto", "lineNumbers": 175 , "snippet": " vulnSlug: string;\n title: string;\n description: string;\n lineNumbers: number ;\n recommendation: string;", "matchedPattern": "weak cipher algorithm" } , "lastScannedAt": "2026-05-06T21:46:56.474Z", "lastScannedRunId": "20260506214655-aa977d40dc0c6524", "fileHash": "3cae016e8e408d488013074db1e00c38e8d52a02aa8ec09480205e14a27… Evidence: `.deepsec/data/deepsec/files/packages/core/src/types.ts.json`
- **Cli.Ts** (structured_config): { "filePath": "packages/deepsec/src/cli.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "insecure-crypto", "lineNumbers": 27, 45, 77, 97, 125, 156, 166, 195, 211, 225, 234, 271, 278, 305 , "snippet": "program\n .name \"deepsec\" \n .description \"AI-powered vulnerability scanner for any codebase\" \n .version \"0.1.0\" \n .addHelpText ", "matchedPattern": "weak cipher algorithm" }, { "vulnSlug": "process-env-access", "lineNumbers": 326 , "snippet": "function printFatal err: unknown : never {\n const verbose = process.env.DEEPSEC DEBUG === \"1\";\n console.error \\n${err instanceof Error ? err.message : err} ;", "matchedPattern": "process.env.DEEPSEC DEBUG" }, { "vulnSlug": "insecur… Evidence: `.deepsec/data/deepsec/files/packages/deepsec/src/cli.ts.json`
- **Init Project.Ts** (structured_config): { "filePath": "packages/deepsec/src/commands/init-project.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "auth-bypass", "lineNumbers": 211 , "snippet": " - Skip generic CWE categories — built-in matchers already cover\n \"SSRF\", \"SQL injection\", \"XSS\". Cover what's project-specific :\n internal auth helpers, custom middleware names, fork-specific\n stubs, intended-public endpoints.\n - One short paragraph or 3–5 short bullets per section. Not both.", "matchedPattern": "auth middleware" }, { "vulnSlug": "insecure-crypto", "lineNumbers": 70, 117, 129 , "snippet": " const projectDataDir = path.join workspaceDir, dataDir id ;\n const dataExists = fs.existsSync projectDataDir && f… Evidence: `.deepsec/data/deepsec/files/packages/deepsec/src/commands/init-project.ts.json`
- **Init.Ts** (structured_config): { "filePath": "packages/deepsec/src/commands/init.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "xss", "lineNumbers": 93 , "snippet": " console.log ;\n console.log ${DIM} --project-id is auto-resolved while there's only one project.${RESET} ;\n console.log ${DIM} Register another codebase later: deepsec init-project ${RESET} ;\n}\n", "matchedPattern": "template literal in HTML" }, { "vulnSlug": "insecure-crypto", "lineNumbers": 134 , "snippet": " version: \"0.1.0\",\n private: true,\n description: \"deepsec scanning workspace\",\n type: \"module\",\n dependencies: { deepsec: \"^0.1.0\" },", "matchedPattern": "weak cipher algorithm" }, { "vulnSlug": "xss", "lineNumbers": 103 , "sn… Evidence: `.deepsec/data/deepsec/files/packages/deepsec/src/commands/init.ts.json`
- **Process.Ts** (structured_config): { "filePath": "packages/deepsec/src/commands/process.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "insecure-crypto", "lineNumbers": 213 , "snippet": " 3. Run a scoped scanFiles so each path has a FileRecord — this\n gives the agent regex-derived signals to anchor on, even when the\n diff includes files outside any matcher's pattern set.\n 4. Run process over those exact paths.\n 5. Optionally render a PR-comment markdown.", "matchedPattern": "weak cipher algorithm" } , "lastScannedAt": "2026-05-06T21:46:56.501Z", "lastScannedRunId": "20260506214655-aa977d40dc0c6524", "fileHash": "bd653022287a4e678a348ce889ff8c046dd506bb4bf5d0d0098025c9953e13fe", "findings": , "analysisHistory":… Evidence: `.deepsec/data/deepsec/files/packages/deepsec/src/commands/process.ts.json`
- **Scan.Ts** (structured_config): { "filePath": "packages/deepsec/src/commands/scan.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "xss", "lineNumbers": 43 , "snippet": " No root path for project \"${opts.projectId}\".\\n +\n Pass --root , or add the project to deepsec.config.ts:\\n +\n projects: { id: \"${opts.projectId}\", root: \" \" } ,\n ;\n}", "matchedPattern": "template literal in HTML" }, { "vulnSlug": "xss", "lineNumbers": 43, 302 , "snippet": " No root path for project \"${opts.projectId}\".\\n +\n Pass --root , or add the project to deepsec.config.ts:\\n +\n projects: { id: \"${opts.projectId}\", root: \" \" } ,\n ;\n}", "matchedPattern": "template literal in HTML" }, { "vulnSlug": "insecure-crypto", "l… Evidence: `.deepsec/data/deepsec/files/packages/deepsec/src/commands/scan.ts.json`
- **Claude Agent Sdk.Ts** (structured_config): { "filePath": "packages/processor/src/agents/claude-agent-sdk.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "insecure-crypto", "lineNumbers": 31 , "snippet": " but its claude binary is absent . Setting this env var lets CI\n point at a separately-installed @anthropic-ai/claude-code and\n sidestep the resolution path entirely.\n /\nconst CLAUDE CODE EXECUTABLE = process.env.CLAUDE CODE EXECUTABLE;", "matchedPattern": "weak cipher algorithm" }, { "vulnSlug": "process-env-access", "lineNumbers": 33 , "snippet": " /\nconst CLAUDE CODE EXECUTABLE = process.env.CLAUDE CODE EXECUTABLE;\n", "matchedPattern": "process.env.CLAUDE CODE EXECUTABLE" } , "lastScannedAt": "2026-05-06T21:46:56.6… Evidence: `.deepsec/data/deepsec/files/packages/processor/src/agents/claude-agent-sdk.ts.json`
- **Codex Sdk.Ts** (structured_config): { "filePath": "packages/processor/src/agents/codex-sdk.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "insecure-crypto", "lineNumbers": 63, 70 , "snippet": "\nfunction makeCodexHome : string {\n const id = ${process.pid}-${++codexHomeCounter}-${Math.random .toString 36 .slice 2, 10 } ;\n const dir = path.join os.tmpdir , codex-home-${id} ;\n fs.mkdirSync dir, { recursive: true } ;", "matchedPattern": "Math.random in security context" }, { "vulnSlug": "env-var-as-bool", "lineNumbers": 135 , "snippet": " // OPENAI BASE URL takes precedence when both are set.\n const baseUrl = process.env.OPENAI BASE URL ?? process.env.ANTHROPIC BASE URL ?? undefined;\n const apiKey = process.env.OPE… Evidence: `.deepsec/data/deepsec/files/packages/processor/src/agents/codex-sdk.ts.json`
- **Shared.Ts** (structured_config): { "filePath": "packages/processor/src/agents/shared.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "auth-bypass", "lineNumbers": 111, 246, 249 , "snippet": "2. Trace data flows — where does input come from? Is it user-controlled?\n3. Follow imports — read related files middleware, utils, shared libs to understand the full picture\n4. Check for mitigations — is there sanitization, validation, auth middleware, or framework protection?\n5. Think broadly — look for issues beyond what the scanner flagged. The scanner only finds surface patterns; you should reason about logic bugs, race conditions, missing checks, etc.\n", "matchedPattern": "auth middleware" }, { "vulnSlug": "rce", "lin… Evidence: `.deepsec/data/deepsec/files/packages/processor/src/agents/shared.ts.json`
- **Detect Tech.Ts** (structured_config): { "filePath": "packages/scanner/src/detect-tech.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "insecure-crypto", "lineNumbers": 133, 135, 136, 325, 326 , "snippet": " if keys.some k = k.startsWith \"laravel/\" exists root, \"artisan\" tags.push \"laravel\" ;\n if keys.some k = k.startsWith \"symfony/\" tags.push \"symfony\" ;\n if keys.includes \"slim/slim\" tags.push \"slim\" ;\n if keys.some k = k === \"yiisoft/yii2\" k.startsWith \"yiisoft/\" tags.push \"yii\" ;\n if keys.includes \"cakephp/cakephp\" tags.push \"cakephp\" ;", "matchedPattern": "weak cipher algorithm" } , "lastScannedAt": "2026-05-06T21:46:56.471Z", "lastScannedRunId": "20260506214655-aa977d40dc0c6524", "fileHa… Evidence: `.deepsec/data/deepsec/files/packages/scanner/src/detect-tech.ts.json`
- **Index.Ts** (structured_config): { "filePath": "packages/scanner/src/index.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "path-traversal", "lineNumbers": 260, 272 , "snippet": " if !ignorePaths {\n try {\n const cfgPath = path.resolve data/${params.projectId}/config.json ;\n if fs.existsSync cfgPath {\n const cfg = JSON.parse fs.readFileSync cfgPath, \"utf-8\" ;", "matchedPattern": "path.resolve with request-derived input" }, { "vulnSlug": "crypto-usage", "lineNumbers": 1, 186 , "snippet": "import crypto from \"node:crypto\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";", "matchedPattern": "Node crypto import, Node crypto.create " }, { "vulnSlug": "path-traversal", "lineNumbers": 261, 273 , "sni… Evidence: `.deepsec/data/deepsec/files/packages/scanner/src/index.ts.json`
- **Index.Ts** (structured_config): { "filePath": "packages/scanner/src/matchers/index.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "auth-bypass", "lineNumbers": 11, 24 , "snippet": "import { allServerActionsMatcher } from \"./all-server-actions.js\";\n// --- Core security matchers ---\nimport { authBypassMatcher } from \"./auth-bypass.js\";\nimport { cacheKeyPoisoningMatcher } from \"./cache-key-poisoning.js\";\nimport { cacheKeyScopeMatcher } from \"./cache-key-scope.js\";", "matchedPattern": "auth skip/bypass" }, { "vulnSlug": "auth-bypass", "lineNumbers": 66, 168 , "snippet": "import { missingAwaitMatcher } from \"./missing-await.js\";\nimport { nextjsMiddlewareMatcher } from \"./nextjs-middleware.js\";\nimpor… Evidence: `.deepsec/data/deepsec/files/packages/scanner/src/matchers/index.ts.json`
- **Js Nextjs Route Handlers.Ts** (structured_config): { "filePath": "packages/scanner/src/matchers/js-nextjs-route-handlers.ts", "projectId": "deepsec", "candidates": { "vulnSlug": "missing-auth", "lineNumbers": 15 , "snippet": " requires: { tech: \"nextjs\" },\n examples: \n export async function GET request { return Response.json {} } ,\n export async function POST request: Request { return Response.json { ok: true } } ,\n export const PUT = async req = Response.json {} ,", "matchedPattern": "HTTP entry point: Next.js App Router handler weak candidate " }, { "vulnSlug": "missing-auth", "lineNumbers": 16 , "snippet": " examples: \n export async function GET request { return Response.json {} } ,\n export async function POST request: Request {… Evidence: `.deepsec/data/deepsec/files/packages/scanner/src/matchers/js-nextjs-route-handlers.ts.json`
- **Schemas** (source_file): import { z } from "zod"; Evidence: `packages/core/src/schemas.ts`
- **Types** (source_file): export interface RunMeta { runId: string; projectId: string; rootPath: string; createdAt: string; completedAt?: string; type: "scan" "process" "revalidate"; phase: "running" "done" "error"; pid?: number; hostname?: string; scannerConfig?: { matcherSlugs: string ; mode?: "full" "files"; source?: string; fileCount?: number; }; processorConfig?: { agentType: string; model: string; modelConfig: Record ; invocationMode?: "scan" "direct"; source?: string; }; stats: { filesScanned?: number; candidatesFound?: number; filesProcessed?: number; findingsCount?: number; totalCostUsd?: number; totalInputTokens?: number; totalOutputTokens?: number; totalDurationMs?: number; findingsRevalidated?: number; t… Evidence: `packages/core/src/types.ts`
- **Cli** (source_file): import { config as dotenvConfig } from "dotenv"; ⋮---- import { getRegistry } from "@deepsec/core"; import { Command } from "commander"; import { collectRepeatable } from "./agent-config.js"; import { enrichCommand } from "./commands/enrich.js"; import { exportCommand } from "./commands/export.js"; import { initCommand } from "./commands/init.js"; import { initProjectCommand } from "./commands/init-project.js"; import { metricsCommand } from "./commands/metrics.js"; import { processCommand } from "./commands/process.js"; import { reportCommand } from "./commands/report.js"; import { revalidateCommand } from "./commands/revalidate.js"; import { sandboxAllCommand } from "./commands/sandbox-al… Evidence: `packages/deepsec/src/cli.ts`
- **Init Project** (source_file): import fs from "node:fs"; import path from "node:path"; import { dataDir, ensureProject } from "@deepsec/core"; import { BOLD, CYAN, DIM, GREEN, RESET, YELLOW } from "../formatters.js"; import { requireExistingDir } from "../require-dir.js"; import { validateProjectId } from "../resolve-project-id.js"; ⋮---- function findWorkspaceRoot start: string : string undefined ⋮---- interface RegisterResult { id: string; targetRel: string; targetAbs: string; configPath: string; setupMdPath: string; infoMdPath: string; } ⋮---- export function registerProject opts: { workspaceDir: string; targetRoot: string; id?: string; force?: boolean; } : RegisterResult ⋮---- function findConfigInWorkspace workspace… Evidence: `packages/deepsec/src/commands/init-project.ts`
- **Init** (source_file): import fs from "node:fs"; import path from "node:path"; import { BOLD, CYAN, DIM, GREEN, RESET, YELLOW } from "../formatters.js"; import { requireExistingDir } from "../require-dir.js"; import { getDeepsecVersion } from "../version.js"; import { PROJECTS INSERT MARKER, registerProject } from "./init-project.js"; ⋮---- interface InitOpts { workspace?: string; targetRoot?: string; id?: string; force?: boolean; } ⋮---- export function initCommand opts: InitOpts ⋮---- function printAgentPrompt id: string, targetRel: string : void ⋮---- function writeFile dir: string, name: string, content: string ⋮---- function workspacePackageName workspaceDir: string : string ⋮---- function packageJson name:… Evidence: `packages/deepsec/src/commands/init.ts`
- **Process** (source_file): import fs from "node:fs"; import path from "node:path"; import { ensureProject, readProjectConfig } from "@deepsec/core"; import { process as processRun } from "@deepsec/processor"; import { scanFiles } from "@deepsec/scanner"; import { buildAgentConfig } from "../agent-config.js"; import { defaultModelForAgent } from "../agent-defaults.js"; import { resolveFiles } from "../file-sources.js"; import { BOLD, CYAN, DIM, GREEN, RED, RESET, YELLOW } from "../formatters.js"; import { renderPrComment } from "../pr-comment.js"; import { assertAgentCredential } from "../preflight.js"; import { renderQuotaMessage } from "../quota-message.js"; import { resolveAgentType } from "../resolve-agent-type.js… Evidence: `packages/deepsec/src/commands/process.ts`
- **Report** (source_file): import fs from "node:fs"; import path from "node:path"; import type { FileRecord, Finding, Severity } from "@deepsec/core"; import { loadAllFileRecords, readProjectConfig, reportJsonPath, reportMdPath } from "@deepsec/core"; import { BOLD, DIM, RESET, severityColor } from "../formatters.js"; import { resolveProjectId } from "../resolve-project-id.js"; ⋮---- function generateMarkdown records: FileRecord , projectId: string : string ⋮---- export async function reportCommand opts: ⋮---- function printStdoutSummary args: { projectId: string; runId?: string; records: FileRecord ; findingsBySeverity: Record<Severity, Finding & Evidence: `packages/deepsec/src/commands/report.ts`
- **Sandbox Process** (source_file): import { defaultModelForAgent } from "../agent-defaults.js"; import { BOLD, CYAN, DIM, GREEN, RED, RESET } from "../formatters.js"; import { assertAgentCredential, assertSandboxCredential } from "../preflight.js"; import { resolveAgentType } from "../resolve-agent-type.js"; import { resolveProjectId } from "../resolve-project-id.js"; import { checkStatus, collect, launch, orchestrate } from "../sandbox/orchestrator.js"; import type { SandboxConfig, SandboxSubcommand } from "../sandbox/types.js"; ⋮---- interface SandboxOpts { projectId?: string; sandboxes?: number; vcpus?: number; snapshotId?: string; saveSnapshot?: boolean; keepAlive?: boolean; detach?: boolean; runId?: string; timeout?: nu… Evidence: `packages/deepsec/src/commands/sandbox-process.ts`
- **Scan** (source_file): import fs from "node:fs"; import path from "node:path"; import { findProject, getConfigPath, loadAllFileRecords, projectConfigPath } from "@deepsec/core"; import { scan } from "@deepsec/scanner"; import { BOLD, CYAN, DIM, GREEN, RESET, YELLOW } from "../formatters.js"; import { requireExistingDir } from "../require-dir.js"; import { resolveProjectId } from "../resolve-project-id.js"; ⋮---- function resolveScanRoot opts: ⋮---- function pad s: string, width: number : string ⋮---- export async function scanCommand opts: ⋮---- // Per-matcher hit counts collected from progress events. Used in the // post-scan summary so we don't have to re-derive it from records. ⋮---- // Progress-bar state. We… Evidence: `packages/deepsec/src/commands/scan.ts`
- **Triage** (source_file): import type { Severity } from "@deepsec/core"; import { readProjectConfig } from "@deepsec/core"; import { triage } from "@deepsec/processor"; import { BOLD, CYAN, DIM, GREEN, RED, RESET, YELLOW } from "../formatters.js"; import { assertAgentCredential } from "../preflight.js"; import { resolveProjectId } from "../resolve-project-id.js"; ⋮---- export async function triageCommand opts: { projectId?: string; severity?: string; force?: boolean; limit?: number; concurrency?: number; model?: string; } ⋮---- onProgress progress Evidence: `packages/deepsec/src/commands/triage.ts`
- **Types** (source_file): import type { Sandbox } from "@vercel/sandbox"; ⋮---- export type SandboxSubcommand = "process" "revalidate" "triage" "scan" "report"; ⋮---- export interface SandboxConfig { projectId: string; command: SandboxSubcommand; sandboxCount: number; vcpus: number; limit?: number; concurrency: number; batchSize: number; agentType?: string; aiApiKeyEnv?: string; aiBaseUrl?: string; model: string; snapshotId?: string; saveSnapshot: boolean; keepAlive: boolean; reinvestigate: boolean number; force: boolean; minSeverity?: string; filter?: string; matchers?: string; timeout: number; allowedHosts?: string ; extraArgs: string ; } ⋮---- export interface SandboxInstance { sandbox: Sandbox; index: number; sa… Evidence: `packages/deepsec/src/sandbox/types.ts`
- **Claude Agent Sdk** (source_file): import { query, type SandboxSettings } from "@anthropic-ai/claude-agent-sdk"; import type { RefusalReport } from "@deepsec/core"; import { backoff, buildInvestigateJsonRepairPrompt, buildInvestigatePrompt, buildRevalidateJsonRepairPrompt, buildRevalidatePrompt, classifyQuotaError, formatJsonRepairFailureDebugText, isTransientError, jsonRepairFailureError, MAX ATTEMPTS, parseInvestigateResults, parseRefusalReport, parseRevalidateVerdicts, QuotaExhaustedError, REFUSAL FOLLOWUP PROMPT, writeParseFailureDebug, } from "./shared.js"; import type { AgentPlugin, AgentProgress, BatchMeta, InvestigateOutput, InvestigateParams, InvestigateResult, RevalidateOutput, RevalidateParams, RevalidateVerdict,… Evidence: `packages/processor/src/agents/claude-agent-sdk.ts`
- **Codex Sdk** (source_file): import { createRequire } from "node:module"; ⋮---- import { fileURLToPath } from "node:url"; import type { RefusalReport } from "@deepsec/core"; import { Codex, type CodexOptions, type ModelReasoningEffort, type ThreadEvent, type ThreadItem, } from "@openai/codex-sdk"; import { backoff, buildInvestigateJsonRepairPrompt, buildInvestigatePrompt, buildRevalidateJsonRepairPrompt, buildRevalidatePrompt, classifyQuotaError, formatJsonRepairFailureDebugText, isTransientError, jsonRepairFailureError, MAX ATTEMPTS, parseInvestigateResults, parseRefusalReport, parseRevalidateVerdicts, QuotaExhaustedError, REFUSAL FOLLOWUP PROMPT, writeParseFailureDebug, } from "./shared.js"; import type { AgentPlugin… Evidence: `packages/processor/src/agents/codex-sdk.ts`
- **Pi Sdk** (source_file): import fs from "node:fs"; import path from "node:path"; import type { RefusalReport } from "@deepsec/core"; import { type AgentSession, type AgentSessionEvent, AuthStorage, createAgentSession, createFindToolDefinition, createGrepToolDefinition, createLsToolDefinition, createReadToolDefinition, DefaultResourceLoader, getAgentDir, ModelRegistry, SessionManager, SettingsManager, type ToolDefinition, } from "@earendil-works/pi-coding-agent"; import { backoff, buildInvestigateJsonRepairPrompt, buildInvestigatePrompt, buildRevalidateJsonRepairPrompt, buildRevalidatePrompt, classifyQuotaError, formatJsonRepairFailureDebugText, isTransientError, isUsingAiGateway, jsonRepairFailureError, MAX ATTEMPT… Evidence: `packages/processor/src/agents/pi-sdk.ts`
- **Registry** (source_file): import type { AgentPlugin } from "./types.js"; ⋮---- export class AgentRegistry ⋮---- register plugin: AgentPlugin : void ⋮---- get type: string : AgentPlugin undefined ⋮---- types : string Evidence: `packages/processor/src/agents/registry.ts`
- **Shared** (source_file): import { spawnSync } from "node:child process"; import fs from "node:fs"; import path from "node:path"; import { dataDir, type FileRecord, type Finding, type RefusalReport } from "@deepsec/core"; import { jsonrepair } from "jsonrepair"; import type { InvestigateResult, RevalidateVerdict } from "./types.js"; ⋮---- export type QuotaSource = "claude-subscription" "anthropic-credits" "openai-quota" "openai-subscription" "gateway-credits" "unknown"; ⋮---- export type QuotaAgentHint = "claude" "codex"; ⋮---- export function classifyQuotaError msg: string, hint?: QuotaAgentHint : QuotaSource undefined ⋮---- export class QuotaExhaustedError extends Error ⋮---- constructor source: QuotaSource, rawMe… Evidence: `packages/processor/src/agents/shared.ts`
- **Types** (source_file): import type { FileRecord, Finding, RefusalReport, RevalidationVerdict } from "@deepsec/core"; ⋮---- export interface AgentProgress { type: "started" "tool use" "thinking" "complete" "error"; message: string; candidateFile?: string; } ⋮---- export interface InvestigateParams { batch: FileRecord ; projectRoot: string; promptTemplate: string; projectInfo: string; config: Record ; signal?: AbortSignal; projectId?: string; } ⋮---- export interface InvestigateResult { filePath: string; findings: Finding ; } ⋮---- export interface BatchMeta { durationMs: number; durationApiMs?: number; numTurns?: number; costUsd?: number; agentSessionId?: string; usage?: { inputTokens: number; outputTokens: number… Evidence: `packages/processor/src/agents/types.ts`
- The remaining 18 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: `.deepsec/README.md`, `README.md`, `samples/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: `.deepsec/README.md`, `README.md`, `samples/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.

- **Repository Overview and System Architecture**: importance `high`
  - source_paths: README.md, docs/architecture.md, docs/data-layout.md, packages/core/src/index.ts, packages/core/src/schemas.ts
- **Agent Backends and AI Model Configuration**: importance `high`
  - source_paths: packages/processor/src/agents/registry.ts, packages/processor/src/agents/claude-agent-sdk.ts, packages/processor/src/agents/codex-sdk.ts, packages/processor/src/agents/pi-sdk.ts, packages/processor/src/agents/shared.ts
- **Scanner Engine and Matcher Library**: importance `high`
  - source_paths: packages/scanner/src/index.ts, packages/scanner/src/matcher-registry.ts, packages/scanner/src/detect-tech.ts, packages/scanner/src/matchers/index.ts, packages/scanner/src/matchers/utils.ts
- **CLI Workflows, Output Formats, and Distributed Execution**: importance `high`
  - source_paths: packages/deepsec/src/cli.ts, packages/deepsec/src/commands/init.ts, packages/deepsec/src/commands/init-project.ts, packages/deepsec/src/commands/scan.ts, packages/deepsec/src/commands/process.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `8779666b2b0715f66e254f5f0308dd8a65c8820b`
- inspected_files: `README.md`, `package.json`, `pnpm-lock.yaml`, `docs/architecture.md`, `docs/configuration.md`, `docs/data-layout.md`, `docs/faq.md`, `docs/getting-started.md`, `docs/meta.json`, `docs/models.md`, `docs/plugins.md`, `docs/reviewing-changes.md`, `docs/supported-tech.md`, `docs/vercel-setup.md`, `docs/writing-matchers.md`, `packages/core/package.json`, `packages/core/src/__tests__/paths.test.ts`, `packages/core/src/__tests__/run.test.ts`, `packages/core/src/__tests__/schemas.test.ts`, `packages/core/src/__tests__/severity.test.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=48964215
- 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=48964215
- 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=48964215
- 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=48964215
- 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=48964215
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
