This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Install dependencies:
npm install - Build everything:
npm run compile - Build extension only:
npm run compile:extension - Build webview only:
npm run build:webview - Type-check webview:
npm run typecheck:webview - Watch extension + webview builds:
npm run watch - Watch extension only:
npm run watch:extension - Watch webview build only:
npm run watch:webview - Lint everything:
npm run lint - Lint extension only:
npm run lint:extension - Lint webview only:
npm run lint:webview - Run the existing focused test:
npm run test:dashboard-search - Run the compiled Node test directly:
node --test out/modules/mainView/bridges/dashboardSearchRanking.test.js
Ampify is a VS Code extension with a single unified MainView webview. The product surface is intentionally narrowed to five capabilities:
- Copier: copy
path:line/path:start-end - Skills manager
- Commands manager
- Git Share sync
- MainView webview shell
Visible MainView sections are fixed to:
dashboardskillscommandsgitsharesettings
copier remains command-driven and does not have its own section.
The codebase is split into two main halves:
- Extension host (
src/): VS Code activation, command registration, filesystem access, Git operations, and view-model construction. - Webview app (
webview/): Vue 3 + Pinia + Vue Router + Element Plus UI rendered inside the MainView.
The build outputs are:
- Extension JS ->
out/ - Webview bundle ->
webview-dist/mainView/
Do not hand-edit webview-dist/; regenerate it from the source in webview/.
src/extension.ts is the extension entrypoint. Activation order is important and currently goes:
- MainView
- Copier
- Git Share
- Skills
- Commands
MainView is registered first because the other modules refresh or route through it.
MainView host-side code lives in src/modules/mainView/ and is organized as:
AmpifyViewProvider.ts: VS CodeWebviewViewProvidercontroller/MainViewController.ts: orchestration layer for state, overlays, confirms, progress, and section refreshescontroller/MessageRouter.ts: routes webview messages into controller methodscontroller/SectionHandlerRegistry.ts: maps section IDs to handlersbridges/*.ts: adapt each module into UI-friendly view models and action handlersshared/contracts.ts: shared message protocol and view-model types used by both host and webviewtemplates/htmlTemplate.ts: webview HTML shell
When changing MainView behavior, treat shared/contracts.ts as the source of truth for host/webview communication. The webview imports it through the @shared alias defined in webview/vite.config.ts.
The MainView frontend lives under webview/src/:
main.ts: bootstraps Vue + Pinia + routerApp.vue: mounts the shell and global dialogsrouter.ts: uses memory history and maps the five sections to routescomposables/useMessageBus.ts: receives extension messages, updates stores, and sendsappReadystores/: app/bootstrap state, per-section data, overlays, progress statesections/: top-level route components (DashboardSection,ResourceSection,SettingsSection)components/ResourceWorkbench.vue: shared UI forskills,commands, andgitshare
The UI is data-driven: the extension host sends section view models, and the webview mostly renders them and emits typed actions back.
src/modules/skills/ and src/modules/commands/ follow similar patterns:
core/*ConfigManager.ts: load and manage stored assetscore/*Importer.ts: import from dialogs or dragged files/folderscore/*Creator.ts: create new assetscore/*Applier.ts: copy assets into the current workspacecore/*AiTagger.ts: AI-based tagging workflowstemplates/: content templatesindex.ts: command registration
MainView does not own these modules’ business logic; it calls into them through bridges and VS Code commands.
Git Share is implemented in src/modules/gitShare/ and src/common/git/.
Important behavior:
- Git Share stores data under the Ampify app root, defaulting to
~/.vscode-ampify/ - Shared repository root is
~/.vscode-ampify/gitshare/ - Synced content is expected in:
vscodeskillsmanager/skillsvscodecmdmanager/commands
- Git Share performs startup receive and shutdown flush logic through its lifecycle returned from
registerGitShare - MainView’s Git Share section is a status/configuration surface over
GitManager
Shared path helpers live in src/common/paths.ts.
Key settings that affect filesystem behavior:
ampify.rootDirampify.skills.injectTargetampify.commands.injectTargetampify.language
Default storage root is ~/.vscode-ampify/. Injection targets are standardized around the .claude/ directory structure.
The canonical section IDs and payload contracts are in src/modules/mainView/shared/contracts.ts.
Important patterns:
- Navigation is limited to
dashboard,skills,commands,gitshare,settings - Resource sections use shared structures like
TreeNode,CardItem,ToolbarAction - Extension/webview messages are strongly typed (
WebviewMessage,ExtensionMessage) - Dashboard search has its own typed result/action model
When adding a field to a section or message, update the shared contract first, then the host bridge/controller, then the Vue consumer.
- Extension TypeScript is compiled by
tscusingtsconfig.jsonintoout/ - Webview TypeScript is checked separately with
vue-tsc -p webview/tsconfig.json --noEmit - ESLint ignores
out/**,node_modules/**, andwebview-dist/** - Vue components intentionally allow single-word component names
- Existing repo guidance is in
AGENTS.md; keep this file aligned with it rather than duplicating conflicting instructions. - README and AGENTS both describe the product as a compact VS Code extension centered on the five capabilities above.
- Legacy launcher/opencode local data may exist on disk but is not used by Ampify anymore.