microsoft/hve-core
Publicmirrored fromhttps://github.com/microsoft/hve-coreAvailable
docs/customization/collections.md
199lines · modecode
| 1 | --- |
| 2 | title: Managing Collections |
| 3 | description: Bundle agents, prompts, instructions, and skills into distributable collection packages with maturity filtering |
| 4 | author: Microsoft |
| 5 | ms.date: 2026-03-10 |
| 6 | ms.topic: how-to |
| 7 | keywords: |
| 8 | - collections |
| 9 | - bundling |
| 10 | - distribution |
| 11 | - maturity |
| 12 | estimated_reading_time: 6 |
| 13 | --- |
| 14 | |
| 15 | ## Collection Architecture |
| 16 | |
| 17 | Collections bundle related agents, prompts, instructions, and skills into distributable |
| 18 | packages. Each collection consists of two files in the `collections/` directory: |
| 19 | |
| 20 | * A YAML manifest (`*.collection.yml`) that lists every artifact included in the collection |
| 21 | * A markdown description (`*.collection.md`) that provides human-readable documentation |
| 22 | |
| 23 | The YAML manifest defines what the collection contains. The markdown description explains |
| 24 | the collection's purpose, lists key artifacts, and helps users decide whether to install it. |
| 25 | Together, these two files form a complete, self-contained collection package that the plugin |
| 26 | generation pipeline processes into distributable output under `plugins/`. |
| 27 | |
| 28 | > [!IMPORTANT] |
| 29 | > The HVE Core installer skill supports agent bundle selection by collection during clone-based setup. This copies agents only. Prompts, instructions, and skills are not filtered by collection. See the [installation guide](../getting-started/install.md) for setup options. |
| 30 | |
| 31 | ## YAML Manifest Format |
| 32 | |
| 33 | Every collection manifest follows the `collection-manifest.schema.json` schema. The top-level |
| 34 | fields are: |
| 35 | |
| 36 | | Field | Required | Description | |
| 37 | |---------------|----------|-----------------------------------------------------------------------| |
| 38 | | `id` | Yes | Unique identifier (lowercase, hyphens only, e.g., `deployment-tools`) | |
| 39 | | `name` | Yes | Human-readable display name | |
| 40 | | `description` | Yes | Brief description of the collection's purpose | |
| 41 | | `maturity` | No | Collection-level maturity tier (defaults to `stable`) | |
| 42 | | `tags` | No | Array of discovery tags for filtering and search | |
| 43 | | `items` | Yes | Array of artifact entries | |
| 44 | | `display` | No | Display configuration (ordering: `alpha` or `manual`) | |
| 45 | |
| 46 | Each entry in the `items` array has these fields: |
| 47 | |
| 48 | | Field | Required | Description | |
| 49 | |------------|----------|---------------------------------------------------------------------| |
| 50 | | `path` | Yes | Relative path from repo root to the source file or directory | |
| 51 | | `kind` | Yes | Artifact type: `agent`, `prompt`, `instruction`, `skill`, or `hook` | |
| 52 | | `maturity` | No | Item-level maturity override (defaults to `stable`) | |
| 53 | | `usage` | No | Optional usage guidance for the item | |
| 54 | |
| 55 | Here is a complete manifest example: |
| 56 | |
| 57 | ```yaml |
| 58 | id: deployment-tools |
| 59 | name: Deployment Tools |
| 60 | description: CI/CD pipeline agents and deployment automation prompts |
| 61 | tags: |
| 62 | - deployment |
| 63 | - ci-cd |
| 64 | - automation |
| 65 | items: |
| 66 | # Agents |
| 67 | - path: .github/agents/deployment/pipeline-builder.agent.md |
| 68 | kind: agent |
| 69 | - path: .github/agents/deployment/rollback-advisor.agent.md |
| 70 | kind: agent |
| 71 | # Prompts |
| 72 | - path: .github/prompts/deployment/deploy-staging.prompt.md |
| 73 | kind: prompt |
| 74 | # Instructions |
| 75 | - path: .github/instructions/deployment/pipeline-standards.instructions.md |
| 76 | kind: instruction |
| 77 | - path: .github/instructions/shared/hve-core-location.instructions.md |
| 78 | kind: instruction |
| 79 | # Skills |
| 80 | - path: .github/skills/deployment/canary-analysis |
| 81 | kind: skill |
| 82 | display: |
| 83 | ordering: manual |
| 84 | ``` |
| 85 | |
| 86 | > [!NOTE] |
| 87 | > The `path` field uses repo-relative paths. Skills reference the skill directory (containing |
| 88 | > `SKILL.md`), not the `SKILL.md` file itself. |
| 89 | |
| 90 | ## Maturity Filtering |
| 91 | |
| 92 | Collections support four maturity tiers that control inclusion in generated plugin output: |
| 93 | |
| 94 | | Tier | Meaning | Plugin Inclusion | |
| 95 | |----------------|--------------------------------------------|-----------------------------| |
| 96 | | `stable` | Production-ready, fully tested | Included in all channels | |
| 97 | | `preview` | Feature-complete but undergoing validation | Included in all channels | |
| 98 | | `experimental` | Early-stage, may change significantly | Excluded from stable builds | |
| 99 | | `deprecated` | Scheduled for removal | Excluded from new builds | |
| 100 | |
| 101 | Maturity applies at two levels: |
| 102 | |
| 103 | * Collection-level: Set the `maturity` field on the manifest root. A collection marked |
| 104 | `experimental` excludes all its items from the stable release channel. |
| 105 | * Item-level: Set the `maturity` field on individual items within the `items` array. |
| 106 | This overrides the collection-level default for specific artifacts. |
| 107 | |
| 108 | When `maturity` is omitted at either level, it defaults to `stable`. |
| 109 | |
| 110 | ## Creating a Collection |
| 111 | |
| 112 | Follow these steps to create a new collection: |
| 113 | |
| 114 | 1. Choose a collection ID. Use lowercase letters and hyphens (e.g., `sre-operations`). |
| 115 | The ID must match the pattern `^[a-z0-9-]+$`. |
| 116 | |
| 117 | 2. Create the YAML manifest at `collections/{id}.collection.yml`. Define the `id`, `name`, |
| 118 | `description`, `tags`, and `items` fields following the schema above. |
| 119 | |
| 120 | 3. Create the markdown description at `collections/{id}.collection.md`. Describe the |
| 121 | collection's purpose, list the key agents and prompts, and explain when to use it. |
| 122 | |
| 123 | 4. Register each artifact in the `items` array with its `path` and `kind`. Verify that |
| 124 | every referenced file exists at the specified path. |
| 125 | |
| 126 | 5. Run the plugin generation pipeline: |
| 127 | |
| 128 | ```bash |
| 129 | npm run plugin:generate |
| 130 | ``` |
| 131 | |
| 132 | 6. Validate the collection metadata: |
| 133 | |
| 134 | ```bash |
| 135 | npm run plugin:validate |
| 136 | ``` |
| 137 | |
| 138 | > [!TIP] |
| 139 | > Start with an existing collection YAML (such as `hve-core.collection.yml`) as a template. |
| 140 | > Copy the structure and replace the content with your artifacts. |
| 141 | |
| 142 | ## Subagent Dependencies |
| 143 | |
| 144 | When a parent agent declares subagents in its `agents:` frontmatter, those subagent files |
| 145 | must also appear in the collection YAML. The plugin generation pipeline does not |
| 146 | automatically resolve transitive agent dependencies. |
| 147 | |
| 148 | For example, if `rpi-agent.agent.md` references `phase-implementor.agent.md` as a subagent, |
| 149 | both files must have entries in the collection manifest: |
| 150 | |
| 151 | ```yaml |
| 152 | items: |
| 153 | - path: .github/agents/hve-core/rpi-agent.agent.md |
| 154 | kind: agent |
| 155 | - path: .github/agents/hve-core/subagents/phase-implementor.agent.md |
| 156 | kind: agent |
| 157 | ``` |
| 158 | |
| 159 | Omitting a subagent causes the parent agent to lose access to that capability when installed |
| 160 | from the collection. |
| 161 | |
| 162 | ## The hve-core-all Superset |
| 163 | |
| 164 | The `hve-core-all.collection.yml` manifest serves as the canonical superset of all stable |
| 165 | artifacts across every collection. It aggregates items from specialized collections (such |
| 166 | as `hve-core`, `ado`, `github`, `project-planning`) into a single comprehensive bundle. |
| 167 | |
| 168 | Update `hve-core-all.collection.yml` when you: |
| 169 | |
| 170 | * Add a new artifact to any collection |
| 171 | * Create an entirely new collection |
| 172 | * Remove or deprecate an existing artifact |
| 173 | |
| 174 | The superset collection ensures users who install the full bundle receive every available |
| 175 | artifact. Items marked with `maturity: experimental` or `maturity: deprecated` at the item |
| 176 | level remain in the superset for visibility but are filtered during stable channel generation. |
| 177 | |
| 178 | ## Role Scenarios |
| 179 | |
| 180 | **Tailspin Toys' SRE/Operations lead** creates a `deployment-tools` collection to bundle |
| 181 | pipeline-builder agents, rollback advisors, and deployment prompts into a single |
| 182 | distributable package. The SRE team installs this collection across all service repositories, |
| 183 | giving every engineer access to standardized deployment workflows without manually copying |
| 184 | individual files. |
| 185 | |
| 186 | **Contoso's platform architect** creates a `microservices-standards` collection containing |
| 187 | API design instructions, service mesh configuration skills, and architecture review agents. |
| 188 | New teams onboarding to the microservices platform install this single collection to receive |
| 189 | all governance artifacts at once. |
| 190 | |
| 191 | ## Further Reading |
| 192 | |
| 193 | See [docs/contributing/](../contributing/) for collection validation rules and artifact |
| 194 | syntax reference. |
| 195 | |
| 196 | <!-- markdownlint-disable MD036 --> |
| 197 | *🤖 Crafted with precision by ✨Copilot following brilliant human instruction, |
| 198 | then carefully refined by our team of discerning human reviewers.* |
| 199 | <!-- markdownlint-enable MD036 --> |
| 200 | |