Skip to content

sessions: improve AI readiness of skill and instruction files#316239

Merged
sandy081 merged 4 commits into
mainfrom
sessions/ai-readiness-skill-improvements
May 13, 2026
Merged

sessions: improve AI readiness of skill and instruction files#316239
sandy081 merged 4 commits into
mainfrom
sessions/ai-readiness-skill-improvements

Conversation

@sandy081
Copy link
Copy Markdown
Member

Summary

Improves the sessions skill and instruction files so AI coding agents can work more effectively on src/vs/sessions/ without extensive manual guidance.

Changes

.github/skills/sessions/SKILL.md (restructured, now lean ~60 lines):

  • Added a "Before Making Any Changes" mandatory reads block: coding-guidelines.instructions.md and source-code-organization.instructions.md — ensures coverage across all harnesses, not just VS Code Copilot where these are auto-injected via applyTo
  • Replaced generic "Covers" column in the spec table with an actionable "When to read" column — each row now describes the specific trigger condition (e.g. "Before adding any cross-module imports")
  • Added a Common Pitfalls section (wrong menu IDs, events vs. observables, provider import violations, missing entry points, modifying workbench code)
  • Made valid-layers-check mandatory in the validation section
  • Removed duplicated content that was already in the spec docs (architecture overview, engineering principles, code organization, development recipes)
  • Removed window isolation section (not applicable)

.github/instructions/sessions.instructions.md (enhanced):

  • Added architecture diagram showing vs/sessionsvs/workbenchvs/editorvs/platformvs/base layering
  • Added internal layer diagram and key constraint (contrib/* must NOT import contrib/providers/*)
  • Added Core Services table (ISessionsManagementService, ISessionsProvidersService, ISession/IChat)
  • Added Key Development Patterns section: contribution entry points, menu registration, context keys, observable patterns with code snippets
  • Added Learnings section with common gotchas discovered during sessions development

Why

These files are the primary guide for AI agents working in the sessions codebase. Without explicit mandatory reads, models may skip layering checks and produce import violations. Without actionable "when to read" triggers, models may skip spec documents that are critical for specific task types.

- Restructure SKILL.md: remove duplicated content, add mandatory
  pre-change reads (coding guidelines, source-code-organization),
  add 'When to read' column to spec table, make valid-layers-check
  mandatory, add common pitfalls section
- Enhance sessions.instructions.md: add architecture overview,
  internal layer diagram, core services table, key development
  patterns (menus, context keys, observables), and learnings section
- Remove window isolation references (not applicable)
- Remove Development Recipes from skill (already in SESSIONS.md)
- Add explicit 'Before Making Any Changes' mandatory reads block
  to ensure coverage in all harnesses (not just VS Code Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 13, 2026 13:18
@sandy081 sandy081 enabled auto-merge (squash) May 13, 2026 13:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refines the AI-facing guidance for working in src/vs/sessions/ by restructuring the sessions skill file and expanding the sessions instruction file to better communicate layering constraints, core APIs, and common development patterns.

Changes:

  • Reworked .github/skills/sessions/SKILL.md to include mandatory prerequisite reads, “when to read” triggers for specs, common pitfalls, and explicit validation requirements.
  • Expanded .github/instructions/sessions.instructions.md with architecture/layering diagrams, core service pointers, contribution/menus/context-key guidance, and observable usage examples.
Show a summary per file
File Description
.github/skills/sessions/SKILL.md Restructures the sessions skill into a shorter, more action-oriented checklist with spec triggers, pitfalls, and validation steps.
.github/instructions/sessions.instructions.md Adds higher-level architecture/layering guidance plus concrete development patterns (entry points, menus, context keys, observables).

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 4

Comment thread .github/instructions/sessions.instructions.md
Comment thread .github/instructions/sessions.instructions.md Outdated
Comment thread .github/instructions/sessions.instructions.md
Comment thread .github/skills/sessions/SKILL.md Outdated
sandy081 and others added 3 commits May 13, 2026 15:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add SESSIONS_LIST.md covering the sessions list features: grouping,
filtering, pinning, read/unread, navigation, mobile adaptations,
menu entry points for contributing actions, and available context keys.

Update SESSIONS.md with a cross-reference and SKILL.md with the new
spec in the documents table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081 sandy081 merged commit 1f66fd7 into main May 13, 2026
25 checks passed
@sandy081 sandy081 deleted the sessions/ai-readiness-skill-improvements branch May 13, 2026 14:07
@vs-code-engineering vs-code-engineering Bot added this to the 1.121.0 milestone May 13, 2026
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