Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 37 additions & 26 deletions extension/PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ extension/
└── PACKAGING.md # This file
```

## Extension Configuration

### Extension Kind

The extension is configured with `"extensionKind": ["workspace", "ui"]` in `package.json` to support multiple execution contexts:

* **Workspace mode**: Extension runs in the workspace extension host with direct access to workspace files (`.github/`, `scripts/dev-tools/`, etc.)
* **UI mode**: Extension runs in the UI extension host on the user's local machine

The extension prioritizes local workspace files when available but seamlessly falls back to bundled copies when running in UI mode or when path resolution fails across OS boundaries.

## Prerequisites

Install the VS Code Extension Manager CLI:
Expand Down Expand Up @@ -65,11 +76,11 @@ npm run extension:prepare

The preparation script automatically:

- Discovers and registers all chat agents from `.github/agents/`
- Discovers and registers all prompts from `.github/prompts/`
- Discovers and registers all instruction files from `.github/instructions/`
- Updates `package.json` with discovered components
- Uses existing version from `package.json` (does not modify it)
* Discovers and registers all chat agents from `.github/agents/`
* Discovers and registers all prompts from `.github/prompts/`
* Discovers and registers all instruction files from `.github/instructions/`
* Updates `package.json` with discovered components
* Uses existing version from `package.json` (does not modify it)

#### Step 2: Package the Extension

Expand All @@ -94,13 +105,13 @@ pwsh ./scripts/extension/Package-Extension.ps1 -Version "1.1.0" -DevPatchNumber

The packaging script automatically:

- Uses version from `package.json` (or specified version)
- Optionally appends dev patch number for pre-release builds
- Copies required `.github` directory
- Copies `scripts/dev-tools` directory (developer utilities)
- Packages the extension using `vsce`
- Cleans up temporary files
- Restores original `package.json` version if temporarily modified
* Uses version from `package.json` (or specified version)
* Optionally appends dev patch number for pre-release builds
* Copies required `.github` directory
* Copies `scripts/dev-tools` directory (developer utilities)
* Packages the extension using `vsce`
* Cleans up temporary files
* Restores original `package.json` version if temporarily modified

### Manual Packaging (Legacy)

Expand Down Expand Up @@ -145,15 +156,15 @@ vsce publish --packagePath "$VSIX_FILE"

The `extension/.vscodeignore` file controls what gets packaged. Currently included:

- `.github/agents/**` - All custom agent definitions
- `.github/prompts/**` - All prompt templates
- `.github/instructions/**` - All instruction files
- `docs/templates/**` - Document templates used by agents (ADR, BRD, Security Plan)
- `scripts/dev-tools/**` - Developer utilities (PR reference generation)
- `package.json` - Extension manifest
- `README.md` - Extension description
- `LICENSE` - License file
- `CHANGELOG.md` - Version history
* `.github/agents/**` - All custom agent definitions
* `.github/prompts/**` - All prompt templates
* `.github/instructions/**` - All instruction files
* `docs/templates/**` - Document templates used by agents (ADR, BRD, Security Plan)
* `scripts/dev-tools/**` - Developer utilities (PR reference generation)
* `package.json` - Extension manifest
* `README.md` - Extension description
* `LICENSE` - License file
* `CHANGELOG.md` - Version history

## Testing Locally

Expand Down Expand Up @@ -243,11 +254,11 @@ See [Agent Maturity Levels](../docs/contributing/ai-artifacts-common.md#maturity

## Notes

- The `.github`, `docs/templates`, and `scripts/dev-tools` folders are temporarily copied during packaging (not permanently stored)
- `LICENSE` and `CHANGELOG.md` are copied from root during packaging and excluded from git
- Only essential extension files are included (agents, prompts, instructions, templates, dev-tools)
- Non-essential files are excluded (workflows, issue templates, agent installer, etc.)
- The root `package.json` contains development scripts for the repository
* The `.github`, `docs/templates`, and `scripts/dev-tools` folders are temporarily copied during packaging (not permanently stored)
* `LICENSE` and `CHANGELOG.md` are copied from root during packaging and excluded from git
* Only essential extension files are included (agents, prompts, instructions, templates, dev-tools)
* Non-essential files are excluded (workflows, issue templates, agent installer, etc.)
* The root `package.json` contains development scripts for the repository

---

Expand Down
1 change: 1 addition & 0 deletions extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "hve-core",
"displayName": "HVE Core",
"extensionKind": ["workspace", "ui"],
"version": "2.0.1",
"description": "AI-powered chat agents, prompts, and instructions for hybrid virtual environments",
"publisher": "ise-hve-essentials",
Expand Down
Loading