intelligent-terminal rust-wta.instructions.md

Coding rules for the WTA Rust crate, a Rust component of the Windows Terminal Agent. They cover the Rust version, Windows build targets, dependencies, file paths, logging, and runtime behavior.

In plain words
What is it for?
Changing WTA Rust code, adding dependencies, handling files and logs, updating runtime behavior, and preparing builds for Windows.
Why use it?
They keep the crate compatible with the repository’s build environment and prevent unsafe handling of paths, secrets, logs, or dependency notices.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/microsoft/intelligent-terminal/rust-wta
Clone the repo
git clone --depth 1 https://github.com/microsoft/intelligent-terminal

Made for: GitHub Copilot.

Per session 450 This file is loaded in full into every session.
When invoked 450 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00450 $0.00450
Opus 5 $0.00225 $0.00225
Sonnet 5 $0.00090 $0.00090
Haiku 4.5 $0.00045 $0.00045

Measured 3d ago against content hash 1e9535e9b0e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

intelligent-terminal rust-wta.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/rust-wta.instructions.md · 46 lines

What it actually says

WTA Rust conventions

These rules complement rust.instructions.md. Architecture, build commands, and product behavior are defined in AGENTS.md and tools/wta/AGENTS.md.

Toolchain and dependencies

  • Keep the CI ms-prod-1.93 pin in tools/wta/rust-toolchain.toml unless a toolchain update is the explicit task. Repo-root local commands use the installed active toolchain, so do not rely on language or library features newer than Rust 1.93.
  • New dependencies must build with the repo's static-CRT Windows MSVC configuration.
  • Use the explicit Windows target from the repo-level build instructions; do not mix host-target and explicit-target outputs.
  • When the shipped dependency graph changes, run build/scripts/Generate-WtaThirdPartyNotices.ps1 with PowerShell 7 and commit both tools/wta/cgmanifest.json and /NOTICE.md.

Runtime behavior

  • Resolve state through runtime_paths::intelligent_terminal_root() and logs through logging::log_dir(). Never construct LocalAppData/package paths by hand.
  • Use structured tracing targets and fields. Never log secrets, provider credentials, or session MCP bearer capabilities.
  • Initialize logging once before substantive startup work and call logging::shutdown_flush() before every std::process::exit.
  • Localize user-facing strings through t!(...); follow rust-localization.instructions.md for locale-file changes.
  • Preserve tab, window, helper, and ACP session identity across asynchronous routing. Do not replace typed identities with loosely related strings.

Testing

  • Cover reducers and routing decisions with deterministic unit tests.
  • Use mock ACP and render harnesses for protocol/UI behavior instead of timing sleeps or live services.
  • Run the explicit-target WTA test command from the repo-level AGENTS.md before committing or pushing behavior changes.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 46 lines · 450 tokens per session scan A 1e9535e9b0e1

Subscribe to this mod's changes

intelligent-terminal rust-wta.instructions.md is an instructions file published in the GitHub repository microsoft/intelligent-terminal (1,908 stars, last pushed yesterday), licensed MIT. It adds 450 tokens to every session, about $0.0022 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.