microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
c5fcf0b3766ea51ef3e9e9317f1d596622255f70

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

docs/customization/collections.md

199lines · modecode

1---
2title: Managing Collections
3description: Bundle agents, prompts, instructions, and skills into distributable collection packages with maturity filtering
4author: Microsoft
5ms.date: 2026-03-10
6ms.topic: how-to
7keywords:
8 - collections
9 - bundling
10 - distribution
11 - maturity
12estimated_reading_time: 6
13---
14
15## Collection Architecture
16
17Collections bundle related agents, prompts, instructions, and skills into distributable
18packages. 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
23The YAML manifest defines what the collection contains. The markdown description explains
24the collection's purpose, lists key artifacts, and helps users decide whether to install it.
25Together, these two files form a complete, self-contained collection package that the plugin
26generation 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
33Every collection manifest follows the `collection-manifest.schema.json` schema. The top-level
34fields 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
46Each 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
55Here is a complete manifest example:
56
57```yaml
58id: deployment-tools
59name: Deployment Tools
60description: CI/CD pipeline agents and deployment automation prompts
61tags:
62 - deployment
63 - ci-cd
64 - automation
65items:
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
82display:
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
92Collections 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
101Maturity 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
108When `maturity` is omitted at either level, it defaults to `stable`.
109
110## Creating a Collection
111
112Follow these steps to create a new collection:
113
1141. Choose a collection ID. Use lowercase letters and hyphens (e.g., `sre-operations`).
115 The ID must match the pattern `^[a-z0-9-]+$`.
116
1172. Create the YAML manifest at `collections/{id}.collection.yml`. Define the `id`, `name`,
118 `description`, `tags`, and `items` fields following the schema above.
119
1203. 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
1234. Register each artifact in the `items` array with its `path` and `kind`. Verify that
124 every referenced file exists at the specified path.
125
1265. Run the plugin generation pipeline:
127
128 ```bash
129 npm run plugin:generate
130 ```
131
1326. 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
144When a parent agent declares subagents in its `agents:` frontmatter, those subagent files
145must also appear in the collection YAML. The plugin generation pipeline does not
146automatically resolve transitive agent dependencies.
147
148For example, if `rpi-agent.agent.md` references `phase-implementor.agent.md` as a subagent,
149both files must have entries in the collection manifest:
150
151```yaml
152items:
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
159Omitting a subagent causes the parent agent to lose access to that capability when installed
160from the collection.
161
162## The hve-core-all Superset
163
164The `hve-core-all.collection.yml` manifest serves as the canonical superset of all stable
165artifacts across every collection. It aggregates items from specialized collections (such
166as `hve-core`, `ado`, `github`, `project-planning`) into a single comprehensive bundle.
167
168Update `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
174The superset collection ensures users who install the full bundle receive every available
175artifact. Items marked with `maturity: experimental` or `maturity: deprecated` at the item
176level 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
181pipeline-builder agents, rollback advisors, and deployment prompts into a single
182distributable package. The SRE team installs this collection across all service repositories,
183giving every engineer access to standardized deployment workflows without manually copying
184individual files.
185
186**Contoso's platform architect** creates a `microservices-standards` collection containing
187API design instructions, service mesh configuration skills, and architecture review agents.
188New teams onboarding to the microservices platform install this single collection to receive
189all governance artifacts at once.
190
191## Further Reading
192
193See [docs/contributing/](../contributing/) for collection validation rules and artifact
194syntax reference.
195
196<!-- markdownlint-disable MD036 -->
197*🤖 Crafted with precision by ✨Copilot following brilliant human instruction,
198then carefully refined by our team of discerning human reviewers.*
199<!-- markdownlint-enable MD036 -->
200