Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Draft SignalNew to Visual Studio Code? Get it now.
Draft Signal

Draft Signal

ahmed hedhili

|
2 installs
| (1) | Free
An opt-in prompt composer that helps you pin down scope before you send a coding request to an AI assistant. Local only; nothing is sent or saved.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Draft Signal

An opt-in prompt composer for VS Code. It helps you pin down scope before you send a coding request to an AI assistant: it shows what your draft leaves open, and it sends nothing you didn't choose to send.

Draft Signal describes text, never the person writing it. It does not infer or report confidence, emotion, stress, competence, productivity, or personality.

What it does

Open Prompt Studio, write or paste a request, and the Draft context panel lists up to three scope items, such as:

  • This request includes multiple requirements; clarify how they relate. "Google login" has no stated scope or expected behavior.
  • Specify the affected feature, file, or function.
  • Add expected behavior or acceptance criteria.

Each item has Keep, Drop, and Why this appeared, which shows the exact rule that matched. When you're ready, choose what to take with you:

Choice Result
Copy final prompt (default) Your draft, exactly as written
Copy with draft context Your draft plus a short neutral block of kept scope notes, for example "The request contains several requirements; "Google login" has no stated scope. Confirm its scope before implementing it."
Copy as Markdown Request and scope notes as Markdown
Ask scope questions Questions for you, generated locally. No model is contacted
Insert into terminal Places a single-line draft at the active terminal's prompt without pressing Enter

Nothing is sent automatically, nothing is rewritten, and there are no pop-ups.

Text rules (M1)

Rule Matches
Multiple requirements Two or more requirement clauses where at least one has three or fewer descriptive words, no identifier, and no expected behavior
Unresolved alternative "X or Y", "either … or …", "and/or", "whether … or …", "maybe/perhaps/optionally …", "TBD"
Ambiguous reference "it/this/that" as the first instruction's object or subject, or phrases such as "that part" or "like before"
Missing target No file path, backticked name, code identifier, or scope noun (file, function, endpoint, component, page, and so on)
Vague request Phrases such as "make it better" or "fix the thing", words such as "stuff" or "somehow", or fewer than four words
Missing acceptance criteria Five or more words and no expected-behavior terms (should, must, returns, status codes, numeric limits, …)
Missing test expectations Eight or more words and no testing terms

Items are deterministic: the same draft always gives the same items and wording.

Drafting signals (optional, M2)

Off by default. When turned on for a session, Draft Signal also notices how the draft changed inside Prompt Studio, using only coarse time buckets (<2s, 2–8s, 8–30s, >30s):

  • Late addition: text appended at the end after a pause (8 s or more) that also contains "too", "also", "as well", or a second instruction.
  • Rewrite: a sentence replaced at least twice that still contains an alternative.
  • Heavy revision: a sentence with far more deleted than retyped that still contains an ambiguous reference.

Each needs two keys: the drafting pattern and a textual marker. Even then, timing cannot create an item. It can only add a neutral observation, such as "'Google login' was added after the sentence was already complete.", to an item the text rules already produced, and move that item up the list. A pause alone never does anything. Gaps longer than 10 minutes are discarded, and pasted, dictated, or IME-composed input creates no timing spans.

Unvalidated. Whether drafting context helps AI responses more than a simple static instruction has not been tested. See experiments/m0-premise-experiment/README.md in the source repository. If it fails, Draft Signal should ship text-only.

Limitations

  • Draft Signal cannot see or change prompts typed anywhere else. A VS Code extension cannot read Copilot Chat's or Cursor's input, cannot read keystrokes inside a terminal running Claude Code or Codex, and Draft Signal does not try. Write in Prompt Studio, then copy or insert.
  • No direct integrations exist yet. Future ones must use approved APIs or wrappers you install.
  • Rules are English-only heuristics. They will miss things and sometimes flag clear requests; Drop exists for that.
  • Terminal insert is single-line only, because a line break would run the command.
  • The draft lives in memory, so reloading VS Code or closing the tab discards it. This is intentional.

Privacy guarantees

  • No network requests, no telemetry, no analytics, no crash reporting, no runtime dependencies.
  • Nothing is written to disk or extension storage: not the draft, scope items, dropped items, or timing data.
  • Only the Prompt Studio tab is observed. No listeners on other documents, terminals, or chats.
  • Drafting signals keep one timestamp and bucketed gaps, never keystrokes or intervals.
  • Clear All, closing the tab, turning the switch off (drafting state), or reloading discards everything held.
  • Show What Draft Signal Holds lists every in-memory value.

Details, a threat table, and limitations are in PRIVACY.md, which ships with the extension.

Install

From a packaged build:

code --install-extension draft-signal-0.3.0.vsix

Or in VS Code: Extensions view → … → Install from VSIX…. Then run Draft Signal: Open Prompt Studio from the Command Palette (Ctrl/Cmd+Shift+P).

If you installed the earlier prototypes, uninstall them first:

code --uninstall-extension prompt-confidence.prompt-confidence-assistant
code --uninstall-extension intent-pause.intent-pause-assistant

Commands

Command What it does
Draft Signal: Open Prompt Studio Opens the composer tab
Draft Signal: Analyze Selected Text Copies the current editor selection into the draft (also in the editor context menu)
Draft Signal: Copy Final Prompt Copies the draft as written
Draft Signal: Copy Prompt with Draft Context Copies the draft plus kept scope notes
Draft Signal: Copy Prompt as Markdown Copies Markdown
Draft Signal: Ask Scope Questions Lists local questions for the kept items
Draft Signal: Insert Final Prompt into Terminal (Not Submitted) Single-line insert, no Enter
Draft Signal: Turn Drafting Signals On or Off Same as the status-bar switch; turning off discards drafting state
Draft Signal: Clear All Discards the draft and everything derived from it
Draft Signal: Show What Draft Signal Holds Shows every in-memory value

Settings

Setting Default Meaning
draftSignal.scopeItems.enabled true Show text scope items
draftSignal.analysisDelayMs 300 Delay after an edit before items refresh (0–5000 ms)
draftSignal.draftingSignals.available true Offer the per-session drafting switch. Set false to stay text-only

The drafting switch itself is not a setting, so it is never saved and always starts off.

Manual test checklist

  1. Run Draft Signal: Open Prompt Studio. The status bar shows Draft context: off.
  2. Type Build authentication for the admin dashboard with Google login too. The multiple-requirements item appears first. Expand Why this appeared.
  3. Click Drop on one item, then Copy with draft context and paste somewhere. The dropped note is absent.
  4. Click Ask scope questions. Questions appear, and nothing opens or sends.
  5. Click Copy final prompt and paste. It is exactly your draft.
  6. Click the status-bar item to turn drafting signals on. Clear the draft, type Build authentication for the admin dashboard, wait about 10 seconds, then type with Google login too. The first item gains the note "Google login" was added at the end of the draft after a pause.
  7. Wait 10 seconds and type It is for staff. (no marker). No new note appears.
  8. Paste a long request instead of typing it. No drafting note appears, and the header says drafting is held back.
  9. Click Show what Draft Signal holds. It shows character counts, buckets, and spans, with no draft text.
  10. Click the status-bar item again. Drafting state is discarded (check step 9 again).
  11. Open any other file, edit it, and return. Prompt Studio is unchanged.
  12. Select a comment in a code file, right-click, and choose Draft Signal: Analyze Selected Text.
  13. Open a terminal, type a one-line draft, and click Insert into terminal. The text appears at the prompt without running. A multi-line draft is refused.
  14. Close the Prompt Studio tab and reopen it. The draft is gone.

Development

Requirements: Node.js 18 or later, npm, and VS Code 1.90 or later.

npm ci                      # exact dependency versions from package-lock.json
npm run compile             # build to out/
npm run lint                # ESLint
npm run typecheck           # tsc --noEmit
npm run audit:privacy       # privacy audit of shipped source, output, and manifest
npm run test:unit           # Mocha unit tests (plain Node)
npm run test:integration    # VS Code extension tests (downloads VS Code once)
npm run verify              # all of the above

Press F5 in VS Code to launch an Extension Development Host.

test:integration downloads a VS Code build into .vscode-test/ on first run and opens a window. On headless Linux, use xvfb-run -a npm run test:integration. The runner quotes paths containing spaces and clears ELECTRON_RUN_AS_NODE, which terminals inside VS Code inherit.

Architecture

src/
  core/                    no VS Code imports; pure and unit-tested
    textEvidence.ts        text rules
    draftReducer.ts        optional drafting signals, reduced at the source
    redaction.ts           gap buckets and limits
    itemBuilder.ts         items, two-key rule, ranking, three-item budget
    contextBlock.ts        output modes and terminal-insert safety
    settings.ts            defaults and validation
  studio/
    documentHost.ts        in-memory draft host (no VS Code imports)
    panelHtml.ts           Prompt Studio page and content-security policy
    panel.ts               webview panel: no serializer, no webview state
    statusBar.ts           per-session drafting switch
  targets/
    promptTarget.ts        clipboard and terminal insert
  extension.ts             commands and wiring
  tools/                   privacy audit, VSIX hashing, M0 experiment (not shipped)
  test/                    unit and integration tests (not shipped)

Reproducible build

  1. Check out the exact commit and use the Node.js version recorded in the release notes.
  2. Install from the lockfile and build:
    npm ci
    npm run verify
    npx @vscode/vsce package --allow-missing-repository
    
  3. Hash the result:
    npm run hash:vsix -- draft-signal-0.3.0.vsix
    
    This prints a SHA-256 for every file in the package, a container hash of the .vsix, and a content hash over file names and file hashes.
  4. Compare the content hash with the one published for the release. The container hash differs between builds because zip entries carry timestamps. The content hash does not.

Container hash alternatives: sha256sum draft-signal-0.3.0.vsix (Linux), shasum -a 256 draft-signal-0.3.0.vsix (macOS), Get-FileHash draft-signal-0.3.0.vsix -Algorithm SHA256 (PowerShell).

--allow-missing-repository is needed only because this project has no public repository URL yet.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft