microsoft/hve-core

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
hve-core-v2.3.6

Branches

Tags

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

Clone

HTTPS

Download ZIP

docs/getting-started/methods/submodule.md

259lines · modecode

1---
2title: Git Submodule Installation
3description: Set up HVE-Core as a git submodule for version-controlled team consumption
4author: Microsoft
5ms.date: 2025-12-02
6ms.topic: how-to
7keywords:
8 - git submodule
9 - installation
10 - github copilot
11 - version control
12 - teams
13estimated_reading_time: 7
14---
15
16Git submodules provide version-controlled, reproducible HVE-Core consumption. Every team member gets the exact same version, and updates are explicit commits.
17
18## When to Use This Method
19
20✅ **Use this when:**
21
22* Your team needs reproducible setups (same version for everyone)
23* You want to pin HVE-Core to a specific version
24* Updates should be deliberate, reviewed commits
25* HVE-Core dependency should be tracked in version control
26
27❌ **Consider alternatives when:**
28
29* You want automatic updates → [Multi-Root Workspace](multi-root.md)
30* You're a solo developer without version pinning needs → [Multi-Root Workspace](multi-root.md)
31
32## How It Works
33
34A git submodule embeds HVE-Core as a nested repository within your project. The `.gitmodules` file tracks the repository URL, and your project's git history tracks the exact commit.
35
36```text
37your-project/
38├── .gitmodules ← Defines submodule URL
39├── lib/
40│ └── hve-core/ ← Submodule (points to specific commit)
41│ └── .github/
42│ ├── agents/
43│ ├── prompts/
44│ └── instructions/
45└── .vscode/
46 └── settings.json ← Points to lib/hve-core paths
47```
48
49## Quick Start
50
51Use the `hve-core-installer` agent:
52
531. Open GitHub Copilot Chat (`Ctrl+Alt+I`)
542. Select `hve-core-installer` from the agent picker
553. Say: "Install HVE-Core using git submodule"
564. Follow the guided setup
57
58## Manual Setup
59
60### Step 1: Add the Submodule
61
62```bash
63# From your project root
64git submodule add https://github.com/microsoft/hve-core.git lib/hve-core
65git commit -m "Add HVE-Core as submodule"
66```
67
68This creates a `.gitmodules` file:
69
70```ini
71[submodule "lib/hve-core"]
72 path = lib/hve-core
73 url = https://github.com/microsoft/hve-core.git
74 branch = main
75```
76
77### Step 2: Configure VS Code Settings
78
79Create or update `.vscode/settings.json`:
80
81```jsonc
82{
83 "chat.agentFilesLocations": {
84 "lib/hve-core/.github/agents": true,
85 ".github/agents": true
86 },
87 "chat.promptFilesLocations": {
88 "lib/hve-core/.github/prompts": true,
89 ".github/prompts": true
90 },
91 "chat.instructionsFilesLocations": {
92 "lib/hve-core/.github/instructions": true,
93 ".github/instructions": true
94 }
95}
96```
97
98### Step 3: Configure Devcontainer (Codespaces)
99
100Update `.devcontainer/devcontainer.json` to initialize submodules automatically:
101
102```jsonc
103{
104 "name": "My Project with HVE-Core",
105 "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
106
107 "onCreateCommand": "git submodule update --init --recursive",
108
109 "customizations": {
110 "vscode": {
111 "extensions": [
112 "github.copilot",
113 "github.copilot-chat"
114 ]
115 }
116 }
117}
118```
119
120## Team Member Onboarding
121
122When team members clone your project, they need to initialize submodules.
123
124**Option A: Clone with submodules (recommended):**
125
126```bash
127git clone --recurse-submodules https://github.com/your-org/your-project.git
128```
129
130**Option B: Initialize after clone:**
131
132```bash
133git clone https://github.com/your-org/your-project.git
134cd your-project
135git submodule update --init --recursive
136```
137
138**Option C: Configure git to auto-recurse:**
139
140```bash
141git config --global submodule.recurse true
142# Now all git operations auto-update submodules
143```
144
145## Updating HVE-Core
146
147| Task | Command |
148|------------------------|-----------------------------------------------------------------------|
149| Check for updates | `cd lib/hve-core && git fetch && git log HEAD..origin/main --oneline` |
150| Update to latest | `git submodule update --remote lib/hve-core` |
151| Pin to specific commit | `cd lib/hve-core && git checkout <sha>` |
152| Track different branch | `git config submodule.lib/hve-core.branch develop` |
153
154**After updating, commit the change:**
155
156```bash
157git add lib/hve-core
158git commit -m "Update HVE-Core submodule to latest"
159```
160
161### Auto-Update on Container Rebuild
162
163To update HVE-Core when rebuilding your devcontainer:
164
165```jsonc
166{
167 "updateContentCommand": "git submodule update --remote lib/hve-core || true"
168}
169```
170
171## Version Pinning
172
173Submodules pin to a specific commit by default. To verify or change the pinned version:
174
175**Check current version:**
176
177```bash
178cd lib/hve-core
179git log -1 --oneline
180```
181
182**Pin to a specific tag or commit:**
183
184```bash
185cd lib/hve-core
186git checkout v1.2.0 # or a specific commit SHA
187cd ..
188git add lib/hve-core
189git commit -m "Pin HVE-Core to v1.2.0"
190```
191
192## Verification
193
194After setup, verify HVE-Core is working:
195
1961. Check `lib/hve-core/` contains the HVE-Core repository
1972. Open Copilot Chat (`Ctrl+Alt+I`)
1983. Click the agent picker dropdown
1994. Verify HVE-Core agents appear (task-planner, task-researcher, etc.)
200
201## Troubleshooting
202
203### Submodule folder is empty
204
205The submodule wasn't initialized:
206
207```bash
208git submodule update --init --recursive
209```
210
211### Agents not appearing
212
213* **Check settings paths:** Verify `.vscode/settings.json` paths match submodule location
214* **Reload window:** `Ctrl+Shift+P` → "Developer: Reload Window"
215* **Verify submodule content:** `ls lib/hve-core/.github/agents/`
216
217### "Detached HEAD" warning in submodule
218
219This is normal for submodules. The submodule points to a specific commit, not a branch. To work on the submodule:
220
221```bash
222cd lib/hve-core
223git checkout main
224```
225
226### Merge conflicts in submodule pointer
227
228When multiple team members update the submodule:
229
230```bash
231git checkout --theirs lib/hve-core # Accept their version
232# OR
233git checkout --ours lib/hve-core # Keep your version
234git add lib/hve-core
235git commit
236```
237
238## Comparison with Other Methods
239
240| Aspect | Submodule | Multi-Root | Clone |
241|----------------------|---------------------|-------------------|---------------|
242| Version controlled | ✅ Yes | ⚠️ Partial | ❌ No |
243| Team reproducibility | ✅ Same version | ⚠️ May vary | ⚠️ May vary |
244| Update control | ✅ Explicit commits | ⚠️ Automatic | ⚠️ Automatic |
245| In workspace | ✅ Subfolder | ✅ Workspace root | ❌ External |
246| Initial setup | 🟡 Medium | 🟡 Medium | 🟢 Easy |
247
248## Next Steps
249
250* [Your First Workflow](../first-workflow.md) - Try HVE-Core with a real task
251* [RPI Workflow](../../rpi/README.md) - Research, Plan, Implement methodology
252* [Back to Installation Guide](../install.md) - Compare other methods
253
254---
255
256<!-- markdownlint-disable MD036 -->
257*🤖 Crafted with precision by ✨Copilot following brilliant human instruction,
258then carefully refined by our team of discerning human reviewers.*
259<!-- markdownlint-enable MD036 -->
260