---
title: Plugin Structure
description: Plugin Structure protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

ObjectStack Plugin Structure Standards (OPS)

Formal Zod definitions for the Plugin Directory Structure and File Naming conventions.

This can be used by the CLI or IDE extensions to lint project structure.

@see PLUGIN_STANDARDS.md

<Callout type="info">
**Source:** `packages/spec/src/kernel/plugin-structure.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { OpsDomainModule, OpsFilePath, OpsPluginStructure } from '@objectstack/spec/kernel';
import type { OpsDomainModule, OpsFilePath, OpsPluginStructure } from '@objectstack/spec/kernel';

// Validate data
const result = OpsDomainModule.parse(data);
```

---

## OpsDomainModule

Scanned domain module representing a plugin folder

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Module name (snake_case) |
| **files** | `string[]` | ✅ | List of files in this module |
| **metadata** | `Record<string, any>` | optional | Custom metadata key-value pairs for extensibility |


---


---

## OpsPluginStructure

Full plugin project layout validated against OPS conventions

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **root** | `string` | ✅ | Root directory path of the plugin project |
| **files** | `string[]` | ✅ | List of all file paths relative to root |
| **metadata** | `Record<string, any>` | optional | Custom metadata key-value pairs for extensibility |


---

