Conversation
Reworks the closed ActiveMemory#128 onto current main. The participant on main is dead on arrival: every invocation passes --no-color, which the CLI no longer has, and recall/add/notify/system/pause/resume/reindex/ prompt/dep/loop no longer match the command tree. ActiveMemory#128 fixed some of that but left dead commands of its own (decision/learning reindex, bare `ctx decision`, split multi-word arguments) and re-implemented skills in TypeScript against file formats ctx no longer uses. CLI-backed commands (27) now build argv for the current tree: noun- verb `<type> add` with provenance filled in (VS Code session ID, git branch and commit), `journal source`, `hook notify|message|pause| resume`, `sysinfo`, `usage`, `index .context/DECISIONS.md`, and so on. runCtx runs without a shell (prompt text on Windows split arguments and `&` ran a second command), closes stdin so a prompting command fails fast, and returns the exit code; one runAndRender shows any non-zero exit as a failure with the CLI's own message. Skill-backed commands (9: brainstorm, spec, implement, next, remember, reflect, wrap-up, blog, consolidate) send the canonical ctx-<name> SKILL.md, bundled from internal/assets/claude/skills at build time, to the chat model together with `ctx agent` output, skill-specific read-only ctx output, earlier turns of the same skill, and #file attachments. The model proposes commands; it cannot run them and is told never to claim it did. Only skill exchanges are sent back to the model, so /pad or /notify input never is. Guard: commandParity.test.ts checks package.json against the dispatch tables, drives every command branch through the chat handler, and snapshots each ctx argv to src/ctx-cli-surface.json. internal/bootstrap/vscode_surface_test.go parses every recorded argv against the real cobra tree (unknown command, flag, or subcommand; bad positional args), runs the entry adds in a scratch project, and checks each bundled skill still ships, so a CLI rename fails go test. Also: natural-language routing reaches only read-only commands; the init gate is gone (the CLI decides, and failures point at /init); the save watcher (its hook exits silently without stdin), commit and dependency popups, and heartbeat file are dropped; /notify setup sends the user to a terminal so the webhook URL stays out of chat; multi-root windows use the active editor's folder. Version 0.10.0; the released 0.9.0 changelog section is unchanged. Refs ActiveMemory#127, ActiveMemory#128. Spec: specs/vscode-skill-backed-participant.md Signed-off-by: Ersan Bilik <ersanbilik@gmail.com>
The VS Code page, the Copilot integration section, and the multi-tool recipe still described the unlanded 45-command participant: file-save and git-commit hooks, a heartbeat, Copilot instructions regenerated on every .context/ change, /verify, /map, and /wrapup. Describe what ships: 27 CLI-backed and 9 skill-backed commands, what the skill commands can and cannot do, the read-only natural-language routing, and the reminder bar and session events that remain. Spec: specs/vscode-skill-backed-participant.md Signed-off-by: Ersan Bilik <ersanbilik@gmail.com>
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.
feat(vscode): skill-backed @ctx participant, verified against the real CLI
Closes #127. Reworks #128 (closed for rework) onto current
main, addressing everypoint of that review. Opened as a draft because the skill-command design changed
(see Design questions) and I'd like your read on it before a full review.
Spec:
specs/vscode-skill-backed-participant.md(committed on-branch; it contains thefull #128 review-point table).
Why now
main's@ctxparticipant is currently dead: every call passes--no-color, which theCLI no longer accepts (30 call sites), so each command prints cobra usage instead of
output.
package.jsonalso declares/hookand/diag, which nothing dispatches, while/setupis dispatched but not declared.What ships
<noun> addwith--session-id/--branch/--commitprovenance,journal source,hook notify|message|pause|resume,index,sysinfo,usage,task complete|archive|snapshot, …/brainstorm /spec /implement /next /remember /reflect /wrap-up /blog /consolidate) send the canonicalctx-<name>SKILL.md (bundled at buildtime) to the chat model, grounded in
ctx agentoutput and#fileattachments. The modelproposes commands; it cannot run them and never claims to.
runCtx: no shell (fixes Windows argument splitting and&command injection), stdinclosed, exit code surfaced; non-zero exits render as failures, never as results; cancel,
timeout, spawn failure and output overflow are errors.
commandParity.test.tsdrives every commandbranch through the handler and snapshots each
ctxargv tosrc/ctx-cli-surface.json;internal/bootstrap/vscode_surface_test.govalidates every argv against the cobra tree,actually runs the entry
addcalls in a scratch project, and checks each referenced skillships — so a CLI rename now fails
go test. Seeded with 14 of feat(vscode): skill-backed chat participant (45 commands) #128's dead calls and 2missing skills, it catches all of them. Refresh:
npx vitest run -uineditors/vscode,review the diff, rerun the Go test.
ctx remind list(and no longer refreshes before the binary resolves);/pause/resume→hook pause|resume; pre-init gate removed (the CLI decides); commandsuse the active editor's workspace folder in multi-root windows.
/prompt/dep/reindex(CLI gone),/loop,/site. Not carried over fromfeat(vscode): skill-backed chat participant (45 commands) #128:
/verify/audit(no shipped skill),/map/check-links/changelog/worktree(need repo browsing / git the participant can't do;
ctx-architecturealso still referencesthe removed
ctx deps). Guardrails / terminal capture from feat(vscode): skill-backed chat participant (45 commands) #128 are not included.Verification
editors/vscode:npm ci, build,tsc(default +tsconfig.ci.json), eslint,vitest 82/82,
vsce package— all green.go test ./...failure roster identical before/after on Windows(pre-existing Windows-only failures),
go vetclean, golangci-lint v2.13.2 0 issues.ctxbuild in a scratch project..vsixin VS Code 1.139.1 and VS Code Insiders 1.140.0on Windows against a scratch
ctx initproject.Design questions for you
SKILL.mdto the chat model (read-only,proposes commands) instead of feat(vscode): skill-backed chat participant (45 commands) #128's TypeScript re-implementations?
/verify/audit/map/check-links/changelog/worktree): drop, or keep as follow-ups once the participant can use tools?hack/release.shrewrites the extension version to ctx'sVERSIONat release,which would move 0.10.0 back to 0.9.x — keep 0.10.0 "Unreleased" or let the release sync it?
/add taskhas no--sectiondefault because the CLI refuses a catch-all section —fine, or should the participant pick one?
--session-iduses the first 8 charsof
vscode.env.sessionId. Acceptable?editors/vscode/src/ctx-cli-surface.json—fine in
internal/bootstrap, or would you prefer it elsewhere?Noticed while reconciling (not changed here):
task add/convention addhelp and skillscall
--sectionoptional but the CLI requires it;pad edit's doc comment says it opens$EDITOR, the code doesn't.🤖 Generated with Claude Code