Skip to content

Commit 4f6d36f

Browse files
committed
Start on dd-2998002
1 parent 0c7558a commit 4f6d36f

3 files changed

Lines changed: 628 additions & 29 deletions

File tree

80-java-monorepo-add-01-remove-before-merge/20260515-prompts.md

Lines changed: 324 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,34 +183,354 @@ Phase 0 states:
183183
- [ ] **Define Freeze window policy** — declare a short freeze window in `copilot-sdk-java` to avoid merge conflicts during migration
184184
```
185185

186-
I'm very loath to freeze agentic syncing. How hard would it be to adopt a policy of manually syncing any changes that come in to `copilot-sdk-java-00` during the migration? I'm pretty much the only committer, and the agentic sync workflow is the only one whot that runs regularly and pushes commits. I could change that to once a week on Friday and probably be ok.
186+
I'm very loath to freeze agentic syncing. How hard would it be to adopt a policy of manually syncing any changes that come in to `copilot-sdk-java-00` during the migration? I'm pretty much the only committer, and the agentic sync workflow is the only one whot that runs regularly and pushes commits. I could change that to once a week on Friday and probably be ok.
187187

188188
### 15:06 Response
189189

190190
This is very practical given your situation. The risk calculus:
191191

192192
**Why it's easy:**
193+
193194
- You're the sole human committer — no surprise PRs to worry about
194195
- Reference-impl-sync changes are predictable: generated code under generated, .lastmerge, package.json, and occasionally hand-written Java adjustments
195196
- Any drift is trivially detectable: `git log --oneline copilot-sdk-java-00/main` tells you exactly what landed
196-
- Phase 1 (copy source) is the only phase truly sensitive to drift — Phases 2-4 create *new* monorepo files that don't conflict
197+
- Phase 1 (copy source) is the only phase truly sensitive to drift — Phases 2-4 create _new_ monorepo files that don't conflict
197198

198199
**Suggested policy instead of a freeze:**
200+
199201
1. Reduce reference-impl-sync to weekly/Friday (as you said)
200202
2. Do Phase 1 copy early in the week, right after verifying java-00 main is clean
201203
3. After each sync lands on Friday, forward-port the diff into `copilot-sdk-00/java/` — a straightforward `git diff PREV_HASH..NEW_HASH` in java-00 applied to the monorepo
202204
4. Once Phase 1 merges and the monorepo is the source of truth, disable the sync workflow entirely
203205

204-
**The one thing to watch:** if a sync lands *during* an active Phase 1 PR review, you'd need to rebase. But since you control the sync schedule, just don't trigger it while a PR is open.
206+
**The one thing to watch:** if a sync lands _during_ an active Phase 1 PR review, you'd need to rebase. But since you control the sync schedule, just don't trigger it while a PR is open.
205207

206208
A hard freeze is overkill here. Want me to update the plan to reflect this policy?
207209

208210
### 15:06 Prompt
209211

210212
Yes.
211213

212-
### 15:06 Response
214+
## dd-2997995-phase-01
215+
216+
### 15:20 Prompt
217+
218+
The plan states
219+
220+
```markdown
221+
- `instructions/``java/instructions/` (or merge into monorepo copilot-instructions)
222+
```
223+
224+
When I look in the `copilot-sdk-00` I observe there is a SKILL for rust, but I don't see any language specific instructions. Am I missing something? Produce a plan for doing the little sub-step of your Phase 01 here.
225+
226+
### 15:29 Response
227+
228+
Explore instruction/skill structure
229+
230+
Searched for files matching `copilot-sdk-00` · `**/*.instructions.md`, no matches
231+
232+
Searched for files matching `copilot-sdk-java-00` · `**/*.instructions.md`, 1 match
233+
234+
Searched for files matching `copilot-sdk-00` · `**/.copilot`, no matches
235+
236+
Searched for files matching `copilot-sdk-java-00` · `**/.copilot`, no matches
237+
238+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github)
239+
240+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github)
241+
242+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/skills)
243+
244+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/skills)
245+
246+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/agents)
247+
248+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/agents)
249+
250+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/skills/rust-coding-skill)
251+
252+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/skills/agentic-merge-reference-impl)
253+
254+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/skills/commit-as-pull-request)
255+
256+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/skills/documentation-coverage)
257+
258+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/nodejs)
259+
260+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/python)
261+
262+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/go)
263+
264+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/dotnet)
265+
266+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/rust)
267+
268+
Searched for files matching `copilot-sdk-00` · `*.instructions.md`, no matches
269+
270+
Searched for files matching `copilot-sdk-00` · `nodejs/**/*.instructions.md`, no matches
271+
272+
Searched for files matching `copilot-sdk-00` · `python/**/*.instructions.md`, no matches
273+
274+
Searched for files matching `copilot-sdk-00` · `go/**/*.instructions.md`, no matches
275+
276+
Searched for files matching `copilot-sdk-00` · `dotnet/**/*.instructions.md`, no matches
277+
278+
Searched for files matching `copilot-sdk-00` · `rust/**/*.instructions.md`, no matches
279+
280+
Searched for files matching `copilot-sdk-00` · `**/instructions`, no matches
281+
282+
Searched for files matching `copilot-sdk-java-00` · `**/instructions`, no matches
213283

284+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/instructions)
214285

286+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/instructions/copilot-sdk-java.instructions.md#1-1), lines 1 to 300
215287

288+
Read skill [rust-coding-skill](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/skills/rust-coding-skill/SKILL.md?vscodeLinkType%3Dskill#1-1), lines 1 to 100
289+
290+
Read skill [agentic-merge-reference-impl](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/skills/agentic-merge-reference-impl/SKILL.md?vscodeLinkType%3Dskill)
291+
292+
Read skill [commit-as-pull-request](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/skills/commit-as-pull-request/SKILL.md?vscodeLinkType%3Dskill)
293+
294+
Read skill [documentation-coverage](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/skills/documentation-coverage/SKILL.md?vscodeLinkType%3Dskill)
295+
296+
Read skill [rust-coding-skill](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/skills/rust-coding-skill/SKILL.md?vscodeLinkType%3Dskill)
297+
298+
Read skill `rust-coding-skill`: [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/skills/rust-coding-skill/examples.md#1-1), lines 1 to 150
299+
300+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/agents/agentic-workflows.agent.md#1-1), lines 1 to 50
301+
302+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/agents/agentic-workflows.agent.md#1-1), lines 1 to 50
303+
304+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/instructions/copilot-sdk-java.instructions.md#300-300), lines 300 to 600
305+
306+
Read [](file:///c%3A/Users/edburns/AppData/Roaming/Code%20-%20Insiders/User/prompts)
307+
308+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/instructions/copilot-sdk-java.instructions.md#600-600), lines 600 to 757
309+
310+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/prompts)
311+
312+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/prompts)
313+
314+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/actions)
315+
316+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/actions)
317+
318+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/aw)
319+
320+
Searched for files matching `copilot-sdk-00` · `**/*.prompt.md`, no matches
321+
322+
Searched for files matching `copilot-sdk-java-00` · `**/*.prompt.md`, 4 matches
323+
324+
Searched for files matching `copilot-sdk-00` · `**/*.agent.md`, 2 matches
325+
326+
Searched for files matching `copilot-sdk-java-00` · `**/*.agent.md`, 1 match
327+
328+
Searched for regex `language.*instruction|instructions.*language|rust.*skill|coding.*skill` (`copilot-sdk-00` · `.github/copilot-instructions.md`), no results
329+
330+
Searched for regex `language.*instruction|instructions.*language|skill|agent` (`copilot-sdk-java-00` · `.github/copilot-instructions.md`), 13 results
331+
332+
Read [](file:///c%3A/Users/edburns/AppData/Roaming/Code%20-%20Insiders/User/workspaceStorage/42e680be608c5e153963c50a3611d619/GitHub.copilot-chat/chat-session-resources/7b272067-59c1-463a-b094-300b246bfc71/toolu_vrtx_017hNdUf5o7v8yju8ZR3EbQ1__vscode-1778880555537/content.txt#1-1), lines 1 to 200
333+
334+
You're correct — the monorepo has no per-language instructions directories. The pattern it uses instead is **skills**. The `rust-coding-skill` at rust-coding-skill serves the same purpose as Java's copilot-sdk-java.instructions.md — it provides language-specific coding rules and API patterns.
335+
336+
Here's the sub-plan:
337+
338+
## Plan: Migrate copilot-sdk-java.instructions.md
339+
340+
### Current State
341+
342+
| Repo | Mechanism | Content |
343+
| ------------ | -------------------------------- | -------------------------------------------------------------------------- |
344+
| **Monorepo** | SKILL.md | Rust-specific coding rules, API patterns, idioms (~300 lines) |
345+
| **Monorepo** | copilot-instructions.md | Cross-language repo governance (build commands, architecture, conventions) |
346+
| **Java SDK** | copilot-sdk-java.instructions.md | Java-specific coding rules, API usage patterns (~1400 lines) |
347+
| **Java SDK** | copilot-instructions.md | Java repo governance (build commands, architecture, conventions) |
348+
349+
### Approach: Create a `java-coding-skill` (follows the Rust pattern)
350+
351+
**Do NOT** put it at `java/instructions/` — that doesn't match the monorepo convention.
352+
**Do NOT** merge 1400 lines into copilot-instructions.md — that would bloat the central file.
353+
354+
**Instead**, create `.github/skills/java-coding-skill/SKILL.md` following the `rust-coding-skill` pattern.
355+
356+
### Steps
357+
358+
1. **Create** `.github/skills/java-coding-skill/SKILL.md`
359+
- Add YAML frontmatter with `name: java-coding-skill` and a description like `"Use this skill whenever editing *.java files in the java/ SDK..."`
360+
- Body = content from copilot-sdk-java.instructions.md
361+
362+
2. **Merge Java repo governance** into monorepo's copilot-instructions.md
363+
- The Java SDK's copilot-instructions.md contains build commands (`mvn clean verify`, `mvn spotless:apply`), architecture notes (package structure, handler patterns), and test conventions.
364+
- Add a `## Java` section to the monorepo's instructions file (paralleling how it already covers Node, Python, Go, .NET, Rust).
365+
- Keep it concise — the detailed API patterns live in the skill.
366+
367+
3. **Do NOT copy** instructions as a directory to `java/instructions/` — the monorepo doesn't use that pattern.
368+
369+
### Result
370+
371+
```
372+
.github/
373+
├── copilot-instructions.md # Add Java section (build, test, conventions)
374+
├── skills/
375+
│ ├── rust-coding-skill/
376+
│ │ ├── SKILL.md
377+
│ │ └── examples.md
378+
│ └── java-coding-skill/ # NEW
379+
│ └── SKILL.md # From instructions/copilot-sdk-java.instructions.md
380+
```
216381

382+
### What This Means for the Plan
383+
384+
The line in Phase 1:
385+
386+
> instructions → `java/instructions/` (or merge into monorepo copilot-instructions)
387+
388+
Should be updated to:
389+
390+
> copilot-sdk-java.instructions.md → `.github/skills/java-coding-skill/SKILL.md` (follows the `rust-coding-skill` pattern); Java repo governance merged into copilot-instructions.md
391+
392+
Want me to execute this, or just update the plan text?
393+
394+
### 15:32 Prompt
395+
396+
Update the plan first.
397+
398+
### 15:34 Response
399+
400+
Compacted conversation
401+
402+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md#1-1), lines 1 to 120
403+
404+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md#120-120), lines 120 to 200
405+
406+
Let me also check the appendix for any related references.
407+
408+
Searched for text `instructions` (`**/dd-2989727-move-java-to-monorepo-plan.md`), 20 results
409+
410+
Let me read the relevant sections around the other references:
411+
412+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md#365-365), lines 365 to 380
413+
414+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md#445-445), lines 445 to 465
415+
416+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md#500-500), lines 500 to 520
417+
418+
Now I have the full picture. There are four places to update:
419+
420+
1. **Line 49** (Phase 1): instructions → `java/instructions/`
421+
2. **Line 373** (§6A table): `Move to java/`
422+
3. **Line 456** (checklist): `copilot-instructions.md includes Java guidance`
423+
4. **Line ~516** (Appendix A): instructions → `java/instructions/`
424+
425+
Replacing 4 lines with 5 lines in [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2989727-move-java-to-monorepo-plan.md)
426+
427+
```
428+
429+
```
430+
431+
Updated all four references in the plan:
432+
433+
1. **Phase 1 (line 49):** instructions → now points to `.github/skills/java-coding-skill/SKILL.md`
434+
2. **§6A inventory table (line 373):** "Move to java" → "Create `.github/skills/java-coding-skill/SKILL.md`"
435+
3. **Verification checklist (line 456):** Split into two items — one for copilot-instructions.md governance section, one for the new skill file
436+
4. **Appendix A (line ~516):** "Move → `java/instructions/`" → "Create skill → `.github/skills/java-coding-skill/SKILL.md`"
437+
438+
Made changes.
439+
440+
### 15:37 Prompt
441+
442+
Now that you have updated the plan file, produce a net-new, very focused plan just for this part: making the monorepo smart about Java, while following all conventions. This plan will be executed by a separate agent to do the work, so include everything an agent could possibly need into this prompt. Write the prompt as a sibling to the plan file, but call it `dd-2998002-make-the-monorepo-smart-about-java-plan.md`. Include checkboxes so the agent can follow along and not get confused and lose context. Be explicit about the goals.
443+
444+
### 15:43 Response
445+
446+
Let me gather the exact source materials the agent plan needs to reference.
447+
448+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/instructions/copilot-sdk-java.instructions.md#1-1), lines 1 to 30
449+
450+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/copilot-instructions.md)
451+
452+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/copilot-instructions.md#1-1), lines 1 to 80
453+
454+
Read skill [rust-coding-skill](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/.github/skills/rust-coding-skill/SKILL.md?vscodeLinkType%3Dskill#1-1), lines 1 to 15
455+
456+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/.github/copilot-instructions.md#80-80), lines 80 to 260
457+
458+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-java-00/instructions/copilot-sdk-java.instructions.md)
459+
460+
Now I have all the source materials. Let me create the focused plan document.
461+
462+
Created [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2998002-make-the-monorepo-smart-about-java-plan.md)
463+
464+
Created dd-2998002-make-the-monorepo-smart-about-java-plan.md. It includes:
465+
466+
- **Explicit goals** — two deliverables (skill file + governance merge)
467+
- **Non-goals** — what NOT to do (no `java/instructions/` directory, no other language changes)
468+
- **7-step checklist** with checkboxes for the agent to follow
469+
- **Exact YAML frontmatter** to use (matching the `rust-coding-skill` pattern)
470+
- **Precise edit instructions** for each section of copilot-instructions.md (6a–6f)
471+
- **Verification step** with 4 confirmation checks
472+
- **Appendix A** — describes the Java instructions source file structure (757 lines, 22 sections)
473+
- **Appendix B** — describes the Java governance content to merge, with guidance on what belongs in governance vs. the skill
474+
475+
Made changes.
476+
477+
### 15:44 Prompt
478+
479+
I intend to use Copilot CLI `copilot --yolo` and ask it to execute the plan as a prompt. It will need to have access to both the monorepo and the java. When I interact with you here in VS Code, that comes by virtue of **Add folder to workspace**. How do I do that with Copilot CLI?
480+
481+
### 15:45 Response
482+
483+
Copilot CLI doesn't have a multi-root workspace concept. It operates from whatever directory you `cd` into. Two practical options:
484+
485+
**Option 1 (recommended): Run from the monorepo, reference Java repo by relative path**
486+
487+
```powershell
488+
cd c:\Users\edburns\workareas\copilot-sdk-00
489+
copilot --yolo
490+
```
491+
492+
Then in your prompt, tell it:
493+
494+
> The Java SDK source repo is at copilot-sdk-java-00. Read copilot-sdk-java.instructions.md for the source content.
495+
496+
This way the monorepo's copilot-instructions.md is automatically discovered (it's in the git root), and the agent can still read files from the sibling repo via copilot-sdk-java-00.
497+
498+
**Option 2: Run from the common parent**
499+
500+
```powershell
501+
cd c:\Users\edburns\workareas
502+
copilot --yolo
503+
```
504+
505+
Both repos are accessible as `copilot-sdk-00/` and `copilot-sdk-java-00/`, but **neither repo's copilot-instructions.md will be auto-loaded** since the parent isn't a git repo.
506+
507+
**I'd go with Option 1** — the monorepo is where all changes land, and the plan document already tells the agent exactly which files to read from the Java repo. You might want to update the plan's Step 2 to explicitly say copilot-sdk-java.instructions.md so the path is unambiguous.
508+
509+
### 15:46 Prompt
510+
511+
Yes, use the relative path option.
512+
513+
Please update the plan to use the relative path thing. Assume `../copilot-sdk-java-00` is the relative path from the `copilot-sdk-00` directory in which I will run copilot --yolo.
514+
515+
### 15:47 Response
516+
517+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2998002-make-the-monorepo-smart-about-java-plan.md#1-1), lines 1 to 60
518+
519+
Read [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2998002-make-the-monorepo-smart-about-java-plan.md#55-55), lines 55 to 120
520+
521+
Now I have the full picture. The references to update are in Steps 2 and 5 where the plan tells the agent where to find files from the Java repo.
522+
523+
Replacing 21 lines with 22 lines in [](file:///c%3A/Users/edburns/workareas/copilot-sdk-00/80-java-monorepo-add-01-remove-before-merge/dd-2998002-make-the-monorepo-smart-about-java-plan.md)
524+
525+
```
526+
527+
```
528+
529+
Updated the plan with four changes:
530+
531+
1. **Added "Execution Context" section** — tells the agent it's running from the monorepo root and the Java repo is at copilot-sdk-java-00 (read-only)
532+
2. **Step 2** — source file path is now copilot-sdk-java.instructions.md
533+
3. **Step 3 body content** — references the same copilot-sdk-java-00 path
534+
4. **Step 5** — governance file path is now copilot-instructions.md
535+
536+
Made changes.

0 commit comments

Comments
 (0)