Skip to content

VS 2026: Core services — .ai-team file parsing in C# #44

@csharpfritz

Description

@csharpfritz

Description

Port the core file parsing services from the TypeScript VS Code extension to C#/.NET. These services form the data layer for the VS 2026 extension, reading and watching the .ai-team/ directory structure.

This issue depends on Issue #43 (project scaffold) being complete.

Acceptance Criteria

  • TeamMdService equivalent implemented (parses team.md)
    • Extracts team members, roles, status, GitHub usernames
    • Returns strong-typed TeamMember model
  • DecisionService equivalent implemented (parses decisions.md and decisions/ directory)
    • Reads main decisions.md file
    • Scans decisions/ subdirectory for decision entries
    • Parses H2/H3 headings and date metadata
    • Returns DecisionEntry model list
  • SkillCatalogService equivalent implemented
    • Scans skills/ directory
    • Parses skill YAML/markdown metadata
    • Returns Skill model with name, description, confidence
  • Shared models defined (TeamMember, DecisionEntry, Skill, SkillEntry, etc.)
    • Models reflect TypeScript equivalents from src/models/index.ts
  • FileWatcherService implemented
    • Watches .ai-team/ directory tree for changes
    • Debounces rapid file changes
    • Triggers service refresh callbacks
    • Clean start/stop lifecycle
  • Service cache invalidation mechanism
    • Services can register invalidation callbacks
    • File changes trigger appropriate service refreshes
  • All services have unit tests
    • Mock file I/O tests
    • Parser logic tests
    • File watcher debounce tests

Implementation Details

Models (C# equivalents)

Create Models/ folder with:

  • TeamMember.cs — Name, Role, Status, GitHubUsername, Biography, etc.
  • DecisionEntry.cs — Title, Date, Authors, Content, Tags
  • Skill.cs — Name, Description, SourceUrl, ConfidenceLevel, InstallCommand
  • SkillEntry.cs — lightweight version for catalog listings
  • FileWatcherEvent.cs — Path, ChangeType, Timestamp

Services (C# equivalents)

Create Services/ folder with:

  • TeamMdService.cs — Parse team.mdList<TeamMember>

    • Reference: src/services/TeamMdService.ts (TypeScript version)
    • Key methods: GetTeamMembers(), GetMemberByUsername()
  • DecisionService.cs — Parse decisions → List<DecisionEntry>

    • Reference: src/services/DecisionService.ts
    • Key methods: GetDecisions(), GetRecentDecisions(days), GetDecisionsByAgent()
  • SkillCatalogService.cs — Parse skills/ directory → List<Skill>

    • Reference: src/services/SkillCatalogService.ts
    • Key methods: GetSkills(), GetSkillByName(), SearchSkills(query)
  • FileWatcherService.cs — Watch .ai-team/ for changes

    • Reference: src/services/FileWatcherService.ts
    • Key methods: Start(), Stop(), RegisterCacheInvalidator(), OnFileChange()
    • Use FileSystemWatcher for file monitoring
    • Implement debounce (300-500ms) to handle rapid changes

Data Flow

FileWatcherService detects change
  ↓
Triggers CacheInvalidator callbacks
  ↓
TeamMdService / DecisionService / SkillCatalogService refresh their caches
  ↓
Services emit refresh events
  ↓
UI layer (tool windows, commands) update their views

Size Estimate

L (Large) — 8-10 hours

Priority

P1 (Critical Path)

Dependencies

Notes

  • Focus on accurate file parsing and caching; don't optimize file I/O yet
  • Use .NET's System.IO.FileSystemWatcher for change detection
  • Markdown parsing can be simple regex-based or use a markdown NuGet package (e.g., MarkdownSharp, Markdig)
  • Keep models serializable (JSON) for future dashboard/API usage
  • Write tests for parsers with fixture files from the actual .ai-team/ directory
  • Assigned to: squad:virgil (VS 2026 Extension Dev)

Metadata

Metadata

Assignees

No one assigned

    Labels

    deferredenhancementNew feature or requestsquad:virgilAssigned to Virgil (VS Extension Dev (VS 2026))vs2026Visual Studio 2026 extension development

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions