Skip to content

[copilot] Tell agents to init the api-docs submodule in new worktrees - #13780

Merged
simonrozsival merged 1 commit into
mainfrom
dev/simonrozsival/agent-instructions-2026-11-25-2
Nov 25, 2026
Merged

simonrozsival merged 1 commit into
mainfrom
dev/simonrozsival/agent-instructions-2026-11-25-2

Conversation

@simonrozsival

Copy link
Copy Markdown
Member

Context: #13778

external/android-api-docs is the repo's only submodule, and new git worktrees don't initialize it. Neither make prepare nor any agent instruction mentions it. Builds in such worktrees run for several minutes and then fail during packaging:

sharedfx.targets(413,5): error MSB4018: System.IO.FileNotFoundException: .../bin/Release/lib/xamarin.android/xbuild-frameworks/Microsoft.Android/37/Mono.Android.xml

_ExportMsxDoc reads external/android-api-docs/docs/xml (src/Mono.Android/Mono.Android.targets), so Mono.Android.xml is never produced.

A review of local agent sessions found this pattern repeatedly:

  • 30 sessions ran git submodule update --init external/android-api-docs by hand, and 37 hit the error above.
  • Each occurrence cost about 10 minutes: a failed make leeroy, a search through a ~20k-line log, and a rebuild.
  • Some orchestration prompts had started carrying "git submodule update --init --recursive if needed" as a workaround.

This adds one bullet to the local-build skill: in a new worktree, run git submodule update --init before building. The bullet includes the error text, so an agent that has already hit the failure can recognize it. The always-loaded instructions are unchanged.

Making make prepare initialize the submodule would remove the step entirely, but it is a build-system change and is not part of this PR.

Validation: documentation-only change; no build or tests run.

@simonrozsival
simonrozsival marked this pull request as ready for review November 25, 2026 14:02
Copilot AI balanced review requested due to automatic review settings November 25, 2026 14:02
@simonrozsival

Copy link
Copy Markdown
Member Author

@dalexsoto review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the documentation-only update adding submodule initialization guidance.

No open issues 🎉

What changed in this PR

Updates the local-build skill to help agents avoid late build failures caused by an uninitialized API documentation submodule in new worktrees.

Changes:

  • Instructs agents to run git submodule update --init before building.
  • Includes the missing Mono.Android.xml error so agents can recognize the failure.

This is documentation-only; build behavior and always-loaded instructions are unchanged.

File Description
.github/​skills/​local-build/​SKILL.md Adds the submodule initialization prerequisite and associated failure symptom.

Review effort: Balanced

simonrozsival added a commit that referenced this pull request Nov 25, 2026
Move the SourceLink workaround next to the standalone dotnet test commands
and leave api-docs submodule guidance to #13780.

Co-authored-by: Copilot App <[email protected]>
@simonrozsival simonrozsival changed the title [docs] Tell agents to init the api-docs submodule in new worktrees [copilot] Tell agents to init the api-docs submodule in new worktrees Nov 25, 2026

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new worktree instruction initializes the pinned api-docs submodule before building, matching the documentation-export input path. No blocking issues found in the change or its build-guidance integration.

@simonrozsival
simonrozsival merged commit 6228730 into main Nov 25, 2026
39 checks passed
@simonrozsival
simonrozsival deleted the dev/simonrozsival/agent-instructions-2026-11-25-2 branch November 25, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants