feat: VS Code extension with full CLI parity, encoding compliance guards#36
Open
bilersan wants to merge 7 commits intoActiveMemory:mainfrom
Open
feat: VS Code extension with full CLI parity, encoding compliance guards#36bilersan wants to merge 7 commits intoActiveMemory:mainfrom
bilersan wants to merge 7 commits intoActiveMemory:mainfrom
Conversation
6f20d62 to
7283ef1
Compare
This was referenced Mar 7, 2026
2d4cce6 to
a279886
Compare
Add a --caller flag to 'ctx init' that lets calling tools (e.g. VS Code extension) identify themselves so ctx can emit tailored context files. When --caller is set, TemplateForCaller checks for a caller-specific override in overrides/<caller>/<template>.md before falling back to the default template. This allows different AI tools to get optimized playbooks without changing the core template set. Includes a VS Code-specific AGENT_PLAYBOOK.md override (268 lines) that provides VS Code-aware instructions: workspace API patterns, extension lifecycle, Copilot Chat participant conventions, and VS Code-specific debugging workflows. Changes: - internal/assets/embed.go: add TemplateForCaller() + embed overrides - internal/assets/overrides/vscode/AGENT_PLAYBOOK.md: VS Code playbook - internal/cli/initialize/cmd/root/run.go: accept caller, use override - internal/cli/initialize/init.go: add --caller flag Signed-off-by: ersan bilik <ersanbilik@gmail.com>
…ages - ValidateBoundary: use case-insensitive comparison on Windows (NTFS) - Root command: set SilenceErrors to prevent Cobra double-printing errors - Extension: add mergeOutput helper to deduplicate stdout/stderr Signed-off-by: ersan bilik <ersanbilik@gmail.com>
- 45 slash commands via @ctx chat participant covering all CLI operations - 45 Command Palette entries (Ctrl+Shift+P) for discoverability - 7 background hooks: onDidSave task-completion, Git post-commit nudge, FileSystemWatcher (.context/** + deps), heartbeat (5min), status bar reminder, session start/end ceremonies - ctx init --caller vscode creates .vscode/extensions.json, tasks.json, and copilot-instructions.md - Context gate: non-init commands require .context/ to exist - Session lifecycle: session-event start/end via ctx system session-event - VS Code README with installation and usage docs Signed-off-by: ersan bilik <ersanbilik@gmail.com>
Signed-off-by: ersan bilik <ersanbilik@gmail.com>
Adds two new compliance tests: - TestNoUTF8BOM: rejects files starting with a UTF-8 byte-order mark - TestNoMojibake: detects double-encoded UTF-8 (Windows encoding corruption) These catch the exact class of corruption we hit when --no-color was removed: a Windows editor re-encoded the UTF-8 files through Windows-1252, turning em dashes and arrows into multi-byte garbage. Signed-off-by: ersan bilik <ersanbilik@gmail.com>
- Guard Claude Code-specific steps (permissions, plugin, Makefile) behind caller check so they are skipped for editor callers - Add ClaudeMdForCaller() to support caller-specific CLAUDE.md overrides; HandleClaudeMd now runs for all callers using the override system - Filter .claude/ entries from .gitignore when caller is set - Add journal and journal-serve tasks to VS Code tasks.json - Fix UTF-8 mojibake in overrides/vscode/AGENT_PLAYBOOK.md - Add language-agnostic VS Code overrides for CONVENTIONS.md, CONSTITUTION.md, and CLAUDE.md Signed-off-by: ersan bilik <ersanbilik@gmail.com>
Signed-off-by: ersan bilik <ersanbilik@gmail.com>
a279886 to
1a48958
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a comprehensive VS Code extension that provides full CLI parity through the Copilot Chat participant, along with caller-specific context template overrides for VS Code workflows.
Merge Order
Changes
1. Caller-specific context template overrides
ctx init --caller vscodeproduces VS Code-tailored context files.vscode/extensions.json,tasks.json, andcopilot-instructions.mdinternal/assets/overrides/<caller>/TemplateForCaller()API with fallback to default templates2. Windows boundary check fixes
EvalSymlinksnormalizes casing differently thanos.Getwd)cli_test.go: adds.exesuffix for Windows binary builds3. VS Code extension — full CLI parity
@ctx /commandchat participantCtrl+Shift+P > ctx: Init, etc.).context/to existctx system session-event --type start|end --caller vscodespecs/vscode-feature-parity.md4. Bug fix: remove
--no-colorfrom CLI calls--no-colorflag from all 48runCtxinvocations5. Compliance: BOM and mojibake detection
TestNoUTF8BOM(rule 21): rejects files starting with a UTF-8 byte-order markTestNoMojibake(rule 22): detects double-encoded UTF-8 (Windows encoding corruption)--no-colorremovalExcluded from this PR (infrastructure-only)
Testing
Commits
feat: caller-specific context template overridesfix: Windows boundary check case sensitivityfeat(vscode): VS Code extension with full CLI parity(squashed)fix(vscode): remove --no-color flag from all ctx CLI callsfeat(compliance): add BOM and mojibake detection tests