Files
Holocron/plugins/kyberforge/docs/research/docs/microsoft-apm/prompt-target-mapping.md
T
Defame1297andClaude Sonnet 5.5 8381c9f395 fix(kyberforge): correct prompt-author claims found in clean-context review
Three clean-context reviewers checked the skill against apm 0.28.0. Fix what
they showed to be wrong: a failed hidden-character install still writes the
Copilot and Gemini outputs and withholds only the Claude command; a multi-key
input item turns each key into an argument. Add the symptom row, use "prompt
file" for the source concept, name the Claude slash-commands source for the
forge discriminator, drop an ambiguous Step 3 pointer and a "trim" heading
with no trim guidance, and tighten two bats assertions. CONTEXT.md now says
"a single-file command that is not a SKILL.md".

Refs #149

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-10-15 16:16:27 +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
apm-cli-0-28-0-prompt-experiments

Scope and confidence

This file maps one .apm/prompts/<name>.prompt.md source to what each apm target receives. The paths and transforms below were observed on apm 0.28.0 using local-path packages in a throwaway project, and cross-checked against the published docs and the installer source. Where docs and observation disagree, the observation is used and prompt-gotchas.md records the disagreement. Runtime behaviour in the receiving tools was not tested.

Output per target

Target Output path Form
copilot (also vscode, intellij) .github/prompts/<name>.prompt.md Byte-identical copy
claude .claude/commands/<name>.md Reconstructed slash command
cursor .cursor/commands/<name>.md Identical transform to claude; output is byte-identical
opencode .opencode/commands/<name>.md Identical transform
grok-build .grok/commands/<name>.md Identical transform
windsurf .windsurf/workflows/<name>.md Identical transform, workflow directory
gemini .gemini/commands/<name>.toml TOML with description and prompt only
codex, kiro, antigravity, agent-skills none Exit 0, no warning
hermes, openclaw, copilot-cowork, grok-cloud, copilot-app none by default Print that an experimental flag is required; untested

At user scope (apm install -g) claude, gemini and cursor deploy to their home-directory commands folders and Copilot deploys to the Copilot user prompts directory. This resolves the earlier doc conflict about Copilot user scope.

Slot terminology

The docs call the source primitive "prompts" and the per-target surface "commands". Claude has no prompts slot in its target profile, so prompts reach it only through apm install, which routes them into the commands slot; apm compile never touches them. There is no .apm/commands/ source directory. A package built with apm pack --format plugin maps the prompts directory to commands/ and renames x.prompt.md to x.md without transforming the contents.

Claude-family output

For a source with description, input (simple, named: The named one, other), allowed-tools, model, argument-hint and extra keys, the Claude command file contains only allowed-tools, argument-hint, arguments, description and model, keys sorted alphabetically, with no trailing newline. input is consumed into arguments: as names only (a single-key {name: description} item loses its description; a multi-key item turns every key into an argument), and argument-hint is synthesised as <a> <b> when absent or kept when given. argumentHint and allowedTools are accepted as aliases. The five keys visible in the output are therefore description, allowed-tools, model, argument-hint and arguments, while the five keys an author may write and expect to survive are description, input, allowed-tools, model and argument-hint.

Frontmatter survival by target

Key Copilot Claude family Gemini
description kept kept kept
input kept as written becomes arguments: dropped silently
allowed-tools kept (Copilot ignores it) kept dropped silently
model kept kept dropped silently
argument-hint kept kept or synthesised dropped silently
any other key kept dropped with a warning naming the keys dropped silently

The VS Code prompt format uses agent, tools and name, which survive on Copilot only.

Body placeholders

Syntax in source Claude family Gemini Copilot
${input:x} $x unchanged unchanged
${{input:x}} $x unchanged unchanged
${input:x:placeholder} unchanged unchanged unchanged
$ARGUMENTS unchanged {{args}} unchanged
$0, $1 unchanged unchanged, and an "Arguments: {{args}}" line is prepended unchanged

Claude Code's own documentation supports $ARGUMENTS, zero-based $N and named $name from a declared arguments: list, so the rewritten output is native to Claude Code.

Workflow-shaped prompts

Only the top-level keys interval, schedule_hour and schedule_day mark a prompt as a Copilot App workflow, and such prompts are skipped by the command integrator. A plain prompt pointed at copilot-app is a hard error. The experimental target was not exercised.

Invocation

Copilot uses its prompt picker. Claude, Cursor, OpenCode and Gemini use /<name> followed by arguments. Windsurf uses the workflows menu. Consumers can bypass the picker with an apm.yml script and apm run <script> --param key=value, which compiles to .apm/compiled/<name>.txt (doc only, not exercised).