Files
Holocron/plugins/kyberforge/docs/research/docs/microsoft-apm/prompt-target-mapping.md
T
Defame1297andClaude Sonnet 5.5 f5a260e85c docs(kyberforge): research apm prompts primitive and prompt-file standards
Add prompt-target-mapping and prompt-gotchas for the apm .prompt.md
primitive from the published apm docs, correct the preserved-key set in
prompt-primitive-schema, and add prompt-standards research covering
Copilot/VS Code prompt files, Claude Code commands, Prompty, Dotprompt
and MCP prompts. No vendor-neutral prompt-file standard was found.

Refs: #149

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-10-15 07:29:52 +00:00

4.8 KiB

topic, source_keys
topic source_keys
prompt-target-mapping
apm-docs-author-prompts
apm-docs-llms-full
apm-docs-producer-ramp
apm-github-repo

Scope and confidence

This file maps one .apm/prompts/<name>.prompt.md source to what each apm target receives. It combines the published apm docs (the "Author a prompt" page, the full docs dump and the producer guide) with the code-level reading already recorded in prompt-primitive-schema.md. Nothing here was verified by running apm 0.28.0; unlike the instructions research there are no install experiments behind it. Doc statements that contradict each other are listed in prompt-gotchas.md rather than resolved here.

Output per target

Target Output path Form
copilot .github/prompts/<name>.prompt.md Verbatim copy, markdown links resolved
claude .claude/commands/<name>.md Reconstructed slash command
cursor .cursor/commands/<name>.md Shared command transformer (same as Claude)
opencode .opencode/commands/<name>.md Shared command transformer
grok-build .grok/commands/<name>.md Grok command
gemini .gemini/commands/<name>.toml TOML command, $ARGUMENTS becomes {{args}}
windsurf .windsurf/workflows/<name>.md Workflow file
copilot-app row in the Copilot App workflows store Experimental, only for workflow-shaped prompts
codex none No prompts or commands primitive

The published compatibility matrix labels Copilot "Native", the command-style targets "Compiled", and Codex, Kiro and Hermes "Unsupported". The published page lists seven deploying targets and Codex as the only explicit "none"; antigravity is described as compiled in the matrix, while the code reading found no commands primitive for it. Treat antigravity, kiro and any other target as unknown until tested.

Slot terminology

The docs call the source primitive "prompts" and the per-target surface "commands". Claude and Cursor have no prompts slot in their target profile, so a package that ships only prompts and is compiled for claude produces zero output from apm compile. Prompts reach Claude only through apm install, which routes them into the commands slot. There is no .apm/commands/ source directory; "command" is purely the compiled name for the same file.

Frontmatter survival by target

Five keys are preserved by the cross-tool command transform: description, input, allowed-tools, model, argument-hint. The published pages list this set as five keys including input; the earlier research digest listed four and treated input as input to arguments only, which is a wording difference rather than a behavioural one.

Key Copilot Claude, Cursor Other command targets
description kept kept kept
input kept as written becomes arguments:, and argument-hint is derived if unset per-target; not individually documented
allowed-tools kept, but Copilot ignores it honored not documented
model kept honored not documented
argument-hint kept kept, or derived from input not documented
any other key (author, mcp, parameters) kept dropped with an install diagnostic dropped with an install diagnostic

The Copilot copy is a byte copy, so every key survives even where the Copilot runtime ignores it. The VS Code prompt-file format uses agent, tools and name keys that apm does not list as preserved, so a prompt written for Copilot with those keys works on Copilot only.

Body placeholders

The apm body syntax is ${input:name}. The transformer rewrites it to the target's native form, for example $name on Claude. On Gemini the argument token is {{args}}. Copilot receives the text unchanged, and VS Code itself understands ${input:name} and ${input:name:placeholder}.

Workflow-shaped prompts

Only the top-level keys interval, schedule_hour and schedule_day mark a prompt as a Copilot App workflow. The other workflow keys (name, mode, model, reasoning_effort) do not by themselves. A plain prompt pointed at copilot-app is a hard error, and workflow-shaped prompts are skipped by the command integrator, so they never appear as slash commands.

Invocation

Copilot uses its prompt picker. Claude, Cursor, OpenCode and Gemini use /<name> followed by arguments. Windsurf uses the workflows menu. Consumers can also bypass the picker through an apm.yml script and apm run <script> --param key=value, which compiles the prompt into .apm/compiled/<name>.txt and substitutes ${input:name} before running the shell command.

Scope

The docs say Copilot prompts, agents, skills, hooks and canvas remain project-scope only, while another passage says user-scope prompts deploy to the Copilot user prompts directory. This is unreconciled and should be tested before the skill makes any user-scope claim.