-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Summary
Different AI tools have different capabilities, APIs, and conventions. When ctx init creates the .context/ directory, the AGENT_PLAYBOOK.md should be tailored to the calling tool — a VS Code Copilot Chat extension needs different guidance than Claude Code running in terminal.
Currently, ctx init always emits the same generic AGENT_PLAYBOOK.md regardless of the calling tool. There is no mechanism for callers to identify themselves or receive customized output.
Proposed Solution
Add a --caller flag to ctx init that lets the calling tool identify itself:
ctx init --caller vscode # VS Code extension calls this
ctx init --caller claude # Claude Code (default, no flag needed)
ctx init # Generic templates (backward compatible)When --caller is set, a new TemplateForCaller(name, caller) function checks overrides/<caller>/<template>.md for a caller-specific version before falling back to the default template. This keeps the default behavior unchanged while allowing tool-specific customization.
VS Code Override
The first override is overrides/vscode/AGENT_PLAYBOOK.md — a VS Code-optimized playbook covering:
- Workspace API patterns and file system conventions
- Extension lifecycle and activation events
- Copilot Chat participant conventions
- VS Code-specific debugging workflows
- Webview and TreeView patterns