Skip to content
/

Shadow Code

shadow-code · adifyr/shadow-code · ★ 79 · last commit 2026-03-12

Developers write pseudocode in a parallel .shadow file; Shadow Code transforms it into target-language production code via VS Code's Language Models API, producing more deterministic output than vibe coding.

Best whenDevelopers think in code, not paragraphs — pseudocode input closer in structure to the intended output produces more consistent, predictable code than natura…
Skip ifNatural language vibe coding (paragraphs describing code), Indexing entire codebase for context (use context() instead)
vs seeds
kiro(IDE-integrated) but Shadow Code is a thin transformation layer within existing VS Code, not a full IDE environment. Uni…
Primitive shape 4 total
Commands 4
00

Summary

Shadow Code — Summary

Shadow Code is a VS Code extension (also available for Cursor) that introduces "Shadow Coding" — a novel AI coding technique where developers write pseudocode in a .shadow file that is transformed into target-language production code by a language model. Rather than prompting in natural English ("add a login button"), developers write pseudo-syntax that is structurally closer to code ("implement LoginButton with OAuth2 provider, error states, redirect to /dashboard on success"), reducing the semantic distance between input and output and producing more deterministic results than vibe coding. The extension opens a split-view "Shadow Mode" panel when editing any code file; the .shadow file is the user's pseudocode scratchpad; the original code file receives the AI-generated output. The context() function in shadow files enables selective context injection (only the files relevant to the task), preventing hallucination from irrelevant codebase noise. At version 0.7.4 with 79 stars (GPL-3.0), Shadow Code is the only VS Code extension in this batch and the only framework based on pseudocode as input rather than natural language or structured templates. Compared to seeds, it maps to no seed directly — it is a distinct input modality (pseudocode → code) rather than a workflow orchestration framework.

01

Overview

Shadow Code — Overview

Origin

Created by adifyr (adifyr/shadow-code). GPL-3.0 license. Version 0.7.4. Pushed 2026-03-12. Publisher: adifyr. TypeScript VS Code extension.

Philosophy

From README:

"Developers think in code, not paragraphs."

Shadow Coding is built on the premise that developers communicate naturally in code-like structures, not English prose. When developers describe what they want to build, they naturally think in terms of types, function signatures, control flow, and data structures — not paragraphs. By letting developers write pseudo-syntax close to the intended output, the AI receives an input that is structurally similar to what it must produce, reducing ambiguity and hallucination.

From README:

"With Shadow Coding, developers can control how predictable they want their AI-generated code to be based on the detail & expressiveness of their pseudocode." "Shadow Coding puts developers back in the driver's seat."

Key design decisions

  1. Pseudocode as a language extension: Shadow Code enables developers to define custom pseudo-syntaxes per language (e.g., firestore class Payment { ... } for Dart ORM generation). The system prompt explains the custom syntax; the AI applies it consistently.

  2. Selective context injection: The context() function at the top of a shadow file specifies exactly which source files the AI sees. This prevents the model from guessing based on unrelated files and produces sharper output.

  3. Dependency auto-install: When the generated code uses undeclared dependencies, Shadow Code automatically installs them.

  4. Language skills: Users can create .shadows/.skills/<LANGUAGE>.md files to teach the AI project-specific coding patterns for any language, effectively extending the language's syntax for their project.

  5. Package-file auto-injection: Shadow Code automatically includes pubspec.yaml (Dart) or package.json (JS/TS) so users don't need to list project dependencies in context().

Manifesto-style quotes

"Shadow Coding produces consistently high-quality code, that is closer to what the developer intends, faster and with less tokens, using cheaper/open-source models."

Breaking change in v0.7.2

import() function renamed to context() to avoid confusion with native language import statements.

02

Architecture

Shadow Code — Architecture

Distribution

VS Code Extension (also Cursor)

  • Publisher: adifyr
  • Extension ID: adifyr.shadow-code-ai
  • Version: 0.7.4
  • Install: VS Code Extensions Marketplace / Cursor Extensions Marketplace

Required runtime

  • VS Code >= 1.108.0 (or Cursor equivalent)
  • GitHub Copilot or other VS Code Language Models API provider
  • Target language runtime (Node.js for JS/TS, Dart SDK for Flutter, etc.)

Directory tree (extension source)

adifyr/shadow-code/
├── src/
│   ├── extension.ts         # Extension entry point
│   ├── commands/
│   │   ├── shadow_mode.ts   # Open Shadow Mode (split view)
│   │   ├── convert_shadow_code.ts  # Trigger AI transformation
│   │   ├── select_model.ts  # Choose LLM
│   │   └── copy_code.ts     # Copy generated code
│   ├── providers/           # Language provider implementations
│   ├── services/            # AI service integration (VS Code Language Models API)
│   └── utils/
├── syntaxes/               # Shadow file syntax highlighting
├── language-configuration.json  # .shadow file language config
└── esbuild.js              # Build script

User-facing directory structure (in project)

<project>/
└── .shadows/               # All shadow files
    ├── src/
    │   └── components/
    │       └── Login.shadow  # Mirrors code file location
    └── .skills/
        ├── DART.md          # Language skills
        ├── PYTHON.md
        └── GO.md

Shadow file example

context("src/components/chat_message.tsx", "assets/styles/message.css");

// The rest of your pseudocode here...
component LoginForm with {
    fields: email, password
    error_state: display inline below failed field
    on_submit: validate → POST /api/auth → redirect /dashboard
    loading_state: disable submit button, show spinner
}

Language support

Modular. All languages use the same system prompt template; Shadow Code injects language name and config files. Basic support for all popular languages. Extended via .shadows/.skills/<LANGUAGE>.md.

AI integration

VS Code's native Language Models API (requires GitHub Copilot or compatible provider). Shadow Code does not make direct API calls — it delegates to the IDE's LLM infrastructure.

03

Components

Shadow Code — Components

VS Code Commands (4)

Command Keybinding Purpose
"Open In Shadow Mode" Ctrl+Alt+S / Cmd+Ctrl+S Open split-view shadow panel; create .shadow file
Transform (✨ icon) Ctrl+Alt+Enter / Cmd+Opt+Enter Send shadow file to AI → overwrite target code file
Select Model Choose AI model for transformation
Copy Code Copy generated code to clipboard

File Types

Extension Purpose
.shadow Pseudocode file (written by developer)
.shadows/ Root directory for all shadow files
.shadows/.skills/<LANGUAGE>.md Language-specific skills (user-defined)

Context Injection

context(<file1>, <file2>, ...) — special syntax at top of shadow file specifying which source files the AI should read. Auto-injected: pubspec.yaml (Dart) or package.json (JS/TS).

Language Skills

User-created markdown files in .shadows/.skills/ that define custom pseudo-syntax for specific languages:

Example (Dart ORM skill):

firestore class Payment {
    id?: string,
    payer_id: string,
    method: enum(cash, card, online),
    amount: double,
}

→ AI generates complete Dart class with Firestore ORM boilerplate.

VS Code Contribution Points

Type Names
commands Open Shadow Mode, Transform, Select Model, Copy Code
languages .shadow file type
grammars Shadow file syntax highlighting
keybindings Ctrl+Alt+S, Ctrl+Alt+Enter
menus Right-click → "Open In Shadow Mode"
configuration Model selection, system prompt settings

No workflow framework primitives

No CLAUDE.md, no skills, no hooks, no commands outside VS Code extension system. Shadow Code is a VS Code extension, not an AI coding framework in the traditional sense.

05

Prompts

Shadow Code — Prompts

Excerpt 1: Dart Firestore ORM Custom Pseudo-Syntax

Source: README.md

firestore class Payment {
    id?: string,
    payer_id: string,
    payer_name: string,
    merchant_id: string,
    method: enum(cash, card, online),
    amount: double,
    reversible: boolean,
    created_at: DateTime,
    updated_at: DateTime,
}

Technique: Custom language extension via pseudo-syntax. The shadow file teaches the AI a developer-defined shorthand for a common boilerplate pattern (Dart Firestore ORM). This is stored in .shadows/.skills/DART.md so the AI consistently applies the same transformation on subsequent uses without re-explaining the convention. The output code is described as "exactly the code we wanted" — more deterministic than natural language prompting.


Excerpt 2: Selective Context Injection

Source: README.md

context("src/components/chat_message.tsx", "assets/styles/message.css");

// The rest of your pseudocode here...

Technique: Explicit context declaration at file scope. Rather than indexing the entire codebase and hoping the model finds relevant files, the developer explicitly names which files the AI should read. This prevents hallucination from unrelated code and keeps the AI's context window focused on the task. Package/config files (package.json, pubspec.yaml) are auto-injected without requiring explicit context() calls.


Excerpt 3: System Prompt Injection (from README token table)

The system prompt template (not directly visible in source but described):

"All languages use the same system and user prompt template. Shadow Code injects the name of the languages and the name of their config files."

Technique: Parameterized system prompt. The extension injects the target language name and project config file names into a shared template, enabling language-agnostic pseudocode-to-code transformation without language-specific prompt engineering. Language skills (.shadows/.skills/<LANGUAGE>.md) extend this template per project with custom conventions.

09

Uniqueness

Shadow Code — Uniqueness

Differs from Seeds

Shadow Code maps to no seed directly. All 11 seeds are workflow orchestration frameworks (skills, commands, agents, hooks, task graphs). Shadow Code is a VS Code extension that changes the input modality for AI coding — pseudocode instead of natural language. The closest seed in spirit is kiro (IDE-integrated, changes how developers interact with AI coding) but kiro is a full coding environment whereas Shadow Code is a thin transformation layer that works within existing VS Code setups. Shadow Code is the only framework in this batch or the seed set that treats pseudocode as a first-class input format with its own file extension, syntax highlighting, and custom skill definitions.

Positioning

Shadow Code fills a niche none of the other 10 frameworks in this batch address: the input quality problem. Other frameworks assume the developer can describe what they want in natural language and focus on how to process that description into code. Shadow Code questions this assumption — developers think in code-like structures and should express requirements in code-like structures. The result is more deterministic output with fewer iterations.

Notable: Language extension pattern

The ability to define custom pseudo-syntax per language (.shadows/.skills/DART.md) effectively lets developers create new domain-specific language extensions via natural language skill files. The Dart Firestore ORM example demonstrates that repeating a boilerplate pattern once in a skill file produces consistent output on all future uses — a form of team-level prompt engineering persisted as a project artifact.

Observable Failure Modes

  1. Requires GitHub Copilot (or equivalent): VS Code Language Models API requires an active model provider. Free users without Copilot cannot use Shadow Code.
  2. Response filtering: README warns about Failed To Stream AI Response: Response got filtered for code matching public patterns. Requires GitHub's "Suggestions matching public code: Allowed" setting.
  3. GPL-3.0 license: Copyleft license limits commercial embedding or modification without sharing source.
  4. No AI coding workflow: Shadow Code produces code but does not manage tasks, specs, PRs, or testing. Users need a separate framework for SDLC management.
  5. Cursor-only outside VS Code: The extension works in VS Code and Cursor only, not Claude Code, Gemini CLI, or other AI coding tools.
  6. Manual context declaration: Developers must manually maintain context() calls in shadow files as the codebase evolves.
04

Workflow

Shadow Code — Workflow

Per-File Workflow

1. Open code file in VS Code
    ↓
2. Open Shadow Mode (Ctrl+Alt+S or right-click → "Open In Shadow Mode")
    → Creates .shadows/<mirrored-path>.shadow file
    → Opens split-view: code file (left) | shadow file (right)
    ↓
3. Write pseudocode in .shadow file
    - Optional: context() at top to specify relevant source files
    - Write pseudo-syntax describing desired behavior
    ↓
4. Transform (✨ icon or Ctrl+Alt+Enter)
    → First time: select AI model
    → Shadow Code sends shadow file + context files + auto-injected config to Language Models API
    → AI generates target code
    → Original code file is overwritten with generated code
    ↓
5. Review generated code in left panel
    - Accept: save and continue
    - Reject: modify shadow file and re-transform

Phases

Phase User Action AI Action Artifact
Shadow creation Open Shadow Mode .shadows/.../.shadow
Pseudocode authoring Write pseudo-syntax .shadow file
Context specification Add context() calls Shadow file header
Transformation Press ✨ Generate target code Modified source file
Dependency install Detect + install missing deps package.json/pubspec.yaml

No Approval Gates

Shadow Code is a transformation tool, not a workflow framework. There are no formal approval gates — the developer reviews the generated code directly and re-transforms if needed.

Iteration

Modify shadow file → re-transform. The shadow file is the scratchpad; the source file is always overwritten on transform.

Token Usage

Metric Value
Input tokens 5k-8k average (10k-12k upper end)
Output tokens 800-2000 average (as big as output code)
Generation time ~10 seconds average
06

Memory Context

Shadow Code — Memory & Context

State Storage

File-based:

  • .shadows/ directory mirrors the project's source file structure
  • .shadows/.skills/<LANGUAGE>.md — project-specific language skills (persistent)
  • .shadows/<path>.shadow — shadow files (persistent, user-editable)

Persistence

Project-level. Shadow files and language skills persist in the repo.

Cross-Session Handoff

Yes — shadow files are durable. A developer can return to a shadow file, modify it, and re-transform without losing prior pseudocode.

Context Management

The context() function is the primary context management mechanism. It is explicit and file-scoped: the developer declares exactly what context the AI needs for each shadow file, preventing context pollution across transformations.

Memory Type

File-based. No database, no vector search.

Language Skills as Memory

.shadows/.skills/<LANGUAGE>.md files are a form of project-specific knowledge persistence — they store the custom pseudo-syntax conventions that the AI should apply consistently across all shadow files for that language. This is analogous to a CLAUDE.md but scoped to a single language's transformation rules.

No Cross-Turn Memory

Shadow Code is a stateless transformation tool. Each transformation is independent — there is no conversation state, task history, or session memory beyond the shadow files and language skills on disk.

07

Orchestration

Shadow Code — Orchestration

Multi-Agent

No. Single AI model call per transformation.

Orchestration Pattern

None. Shadow Code is a point-in-time transformation tool, not a workflow orchestrator.

Isolation Mechanism

None (not applicable — single-file transformation).

Multi-Model

Via VS Code Language Models API — the user selects from available models (GitHub Copilot, etc.). Not a multi-model routing system; user-selected single model per transformation.

Execution Mode

One-shot. Each transformation is a single, independent API call.

Crash Recovery

Not applicable (stateless single-call tool).

Context Compaction

Not applicable.

Cross-Session Handoff

Via shadow files on disk.

Prompt Chaining

No. Each transformation is independent.

Subagents

None.

Note on classification

Shadow Code does not fit neatly into the orchestration framework taxonomy. It is an IDE transformation tool rather than an agent framework. It does not orchestrate multiple agents, manage task graphs, or persist session state. Its "workflow" is: user writes pseudocode → triggers single AI call → reviews output.

08

Ui Cli Surface

Shadow Code — UI & CLI Surface

Extension Type

VS Code Extension (also Cursor)

Activation Points

  1. Right-click on file tab → "Open In Shadow Mode"
  2. Click Shadow Code icon (end of editor tabs line)
  3. Keyboard shortcut: Ctrl+Alt+S (Windows) / Cmd+Ctrl+S (Mac)

Shadow Mode UI

Split view:

  • Left panel: Original code file (receives generated output)
  • Right panel: Shadow file (pseudocode input)

Both panels are standard VS Code editor panels — no custom UI components beyond the split-view layout and the ✨ transform button.

Transform Trigger

  1. Click ✨ sparkles icon (end of tabs line)
  2. Keyboard shortcut: Ctrl+Alt+Enter (Windows) / Cmd+Opt+Enter (Mac)

Model Selection

First transform: model selection prompt. Subsequent transforms: use last selected model. Integrates with VS Code Language Models API — shows available models from installed providers (GitHub Copilot, etc.).

Language Skills Panel

No UI — .shadows/.skills/<LANGUAGE>.md files are edited in standard VS Code file editor.

CLI Binary

None. All interaction is through VS Code extension UI.

Dashboard

None.

Observability

No audit log. No token usage display. Token statistics are documented in README (5k-8k input tokens, 800-2000 output tokens, ~10s generation time) but not surfaced in the UI.

Performance

Reported in README:

  • Input: 5k-8k tokens average (10k-12k upper end)
  • Output: 800-2000 tokens average
  • Generation time: ~10 seconds average

Related frameworks

same archetype · same primary tool · same memory type

Kiro ★ 3.8k

Prevents 'vibe coding' by enforcing a Requirements→Design→Tasks spec pipeline with EARS notation before any code is generated.

Zed ★ 84k

Open-source, GPU-accelerated IDE with a native AI agent featuring LSP-aware tools, update_plan for visible task tracking,…

Cline ★ 62k

SDK-first autonomous coding agent with human-in-the-loop approval across VS Code, JetBrains, CLI, and a parallel-agent Kanban…

openspec-for-copilot ★ 18

Brings OpenSpec spec-driven development to GitHub Copilot Chat users via a VS Code extension with sidebar spec management,…

OpenSpec-Zed ★ 14

Adds OpenSpec slash commands to the Zed editor's AI Assistant panel so Zed users can initiate spec-driven workflows without…

TabbyML/Tabby ★ 34k

Self-hosted AI coding assistant server (alternative to GitHub Copilot) with admin dashboard, RAG-based completions, and multi-IDE…