Hopsule VSCode ExtensionIDE integration for enforcement and context. A Visual Studio Code extension that enforces accepted decisions inside your IDE, surfaces context packs, highlights contradictions, and requires intentional overrides. This extension serves as an enforcement surface that reflects authority from the central Table of Contents
OverviewThe Hopsule VSCode Extension integrates decision-first governance directly into your development environment. It connects to the Key Purpose: This extension enforces accepted decisions inside the IDE. It surfaces context packs, highlights contradictions, and requires intentional overrides. It is a constraint and reminder surface, not a decision maker. Features🎯 In-Editor Decision Enforcement
📦 Context Pack Visualization
⚠️ Conflict Highlighting
🔧 Commands & Actions
Architecture & PhilosophyAuthority ModelThis extension operates under a strict authority model:
Enforcement PhilosophyEnforcement is framed as remembrance, not control:
The extension remembers past decisions and surfaces contradictions, requiring conscious deviation. It does not police or arbitrarily block—it reminds and requires acknowledgment. InstallationOption 1: Debug Mode (Development)
Option 2: VSIX Package (Production)
Prerequisites
ConfigurationConfigure the extension in VS Code settings (
Configuration Options
Accessing Settings
UsageCommandsAccess commands via the Command Palette (
|
| Script | Description |
|---|---|
npm run compile |
Compile TypeScript to JavaScript (outputs to out/ directory) |
npm run watch |
Watch mode: automatically recompile on file changes |
npm run lint |
Run ESLint on source files |
npm run vscode:prepublish |
Prepare extension for publishing (runs compile) |
Project Structure
ide-addon/
├── package.json # VS Code extension manifest (commands, views, configuration)
├── tsconfig.json # TypeScript configuration
├── .vscodeignore # Files excluded from extension package
├── .gitignore # Git ignore patterns
├── src/
│ ├── extension.ts # Main entry point (activate/deactivate hooks)
│ ├── commands/ # Command handlers
│ │ ├── index.ts # Command exports
│ │ ├── showDecisions.ts # Show active decisions command
│ │ ├── showConflicts.ts # Show conflicts command
│ │ ├── loadContextPack.ts # Load context pack command
│ │ └── overrideDecision.ts # Override decision command
│ ├── providers/ # Tree views and diagnostics providers
│ │ ├── index.ts # Provider exports
│ │ ├── decisionsProvider.ts # Tree view for decisions
│ │ ├── conflictsProvider.ts # Tree view for conflicts
│ │ └── diagnosticsProvider.ts # Diagnostics provider for violations
│ └── types/ # TypeScript type definitions
│ └── index.ts # Decision, Conflict, ContextPack, Memory types
└── README.md # This file
Building for Production
Compile:
npm run compilePackage (requires
vsce):npm install -g vsce vsce packageOutput: A
.vsixfile will be created in the project root
Integration with decision-api
This extension connects to decision-api to:
- Fetch active decisions: Retrieves all
ACCEPTEDdecisions for enforcement - Check for conflicts: Sends code snippets to
decision-apifor conflict detection - Log overrides: Records intentional decision overrides for audit purposes
- Load context packs: Validates and applies context packs through
decision-api
API Endpoints Used
The extension communicates with decision-api using standard HTTP requests:
GET {apiUrl}/decisions?status=ACCEPTED- Fetch active decisionsPOST {apiUrl}/conflicts/check- Check code for conflicts (when implemented)POST {apiUrl}/overrides- Log decision overrides (when implemented)POST {apiUrl}/context-packs/load- Load context pack (when implemented)
Important Notes
- This extension never mutates authoritative state. All state changes go through
decision-api. - This extension does not create decisions. It only enforces existing accepted decisions.
- Network errors are handled gracefully. If
decision-apiis unavailable, the extension will show appropriate warnings but will not crash.
Limitations & Boundaries
What This Extension DOES
✅ Fetches decisions from decision-api
✅ Enforces accepted decisions inside the IDE
✅ Surfaces contradictions as diagnostics
✅ Requires intentional overrides
✅ Displays decisions and conflicts in tree views
✅ Loads context packs from files
What This Extension DOES NOT Do
❌ Does NOT own data — All decisions come from decision-api
❌ Does NOT decide anything — Only decision-api can accept or deprecate decisions
❌ Does NOT create authority — It reflects authority, it does not create it
❌ Is NOT an assistant — It is a constraint and reminder surface
❌ Is NOT a helper — It enforces, it does not assist
❌ Does NOT resolve conflicts — Conflict resolution happens in decision-api
❌ Does NOT mutate state — All state changes go through decision-api
Architectural Constraints
This extension is designed to be strictly advisory and enforcement-focused. It:
- Never makes autonomous decisions
- Never creates or modifies decisions
- Never resolves conflicts independently
- Always defers to
decision-apifor authority
If you need to create, modify, or deprecate decisions, use the decision-api service directly or through the web application.
Contributing
When contributing to this extension, remember:
- This extension is an enforcement surface, not a decision maker
- All decisions come from
decision-api - Enforcement is remembrance, not control
- Language matters — avoid framing that suggests this extension creates authority
Follow the architectural principles outlined in the main project rules. This extension must maintain its identity as a constraint and reminder surface.
License
[To be determined]
Support
For issues, questions, or contributions:
- Issues: Report bugs or request features via the project's issue tracker
- Documentation: See the main project README for system-wide architecture
- decision-api: Ensure
decision-apiis running and accessible before using this extension
Remember: This extension enforces accepted decisions—it does not create them. All authority resides in decision-api.