work-on-features

Systematically implements incomplete features from CHANGELOG.md [Unreleased] section with testing

SKILL.md

GitHub

Work on Features

You are the Work Features automation skill for the m365-mail-mirror project. Your mission is to systematically implement features from the Changelog [Unreleased] section (CHANGELOG.md) until all features are complete.

Core Workflow

  1. Analyze Changelog Status

    • Read CHANGELOG.md and find the ## [Unreleased] section
    • Identify all incomplete features (unchecked - [ ] items) in the [Unreleased] section
    • Create a TodoWrite list with all incomplete features found
    • Identify the first incomplete feature to work on
    • Display the feature being worked on to the user
  2. Understand Requirements

    • Read CLAUDE.md for project overview and architecture principles
    • Read DESIGN.md for technical implementation patterns
    • Read relevant ADRs (listed in CHANGELOG.md next to features) for decision context
    • Read existing source code to understand current patterns
    • Use the Explore agent (Task tool with subagent_type=Explore) if you need to understand codebase structure
  3. Implement the Feature

    • Create detailed implementation plan using TodoWrite with sub-tasks for:
      • Core implementation files
      • Unit test files
      • Any supporting infrastructure
    • Follow project conventions:
      • .NET 10, C# 13 code style
      • Use existing patterns from codebase
      • Avoid over-engineering (YAGNI principle from CLAUDE.md)
      • No unnecessary abstractions
      • Follow security best practices
    • Write clean, focused code that implements ONLY what's specified
    • Mark sub-tasks as completed in TodoWrite as you finish them
  4. Write Unit Tests

    • Every feature MUST have comprehensive unit tests
    • Follow the three-tier testing strategy from DESIGN.md
    • Unit tests should:
      • Be fast (mocked dependencies)
      • Cover happy paths and error cases
      • Use xUnit, Moq, FluentAssertions
      • Follow existing test patterns in the codebase
    • Name tests clearly: MethodName_Scenario_ExpectedBehavior
  5. Verify Implementation

    • Run dotnet build to ensure code compiles
    • Run dotnet test to execute all unit tests
    • Fix any compilation errors or test failures
    • Re-run tests until all pass
    • Do NOT mark feature as complete until all tests pass
  6. Mark Feature as Complete

    • Once all tests pass and implementation is verified:
      • Read CHANGELOG.md
      • In the ## [Unreleased] section, update the specific feature line from - [ ] to - [x]
      • Write the updated CHANGELOG.md back
      • Confirm completion to the user with feature name
  7. Continue to Next Feature

    • Re-read CHANGELOG.md [Unreleased] section to find next incomplete feature
    • Repeat steps 2-7 until all features are complete
    • If all features are complete, report success to user
  8. Handle Errors and Blockers

    • If you encounter an error or blocker:
      • Document the issue clearly
      • Attempt to resolve it (read docs, fix code, adjust approach)
      • If unresolvable, ask user for guidance using AskUserQuestion
      • Do NOT mark feature as complete if blocked
      • Keep the current feature as in_progress in TodoWrite

Resumption Behavior

When the work-on-features skill is invoked:

  • ALWAYS start by reading CHANGELOG.md [Unreleased] section to check current status
  • If there are unchecked features, continue from the first unchecked item
  • If all features are checked, report completion and success
  • Use CHANGELOG.md [Unreleased] section as the single source of truth for progress

Important Guidelines

  • One feature at a time: Focus completely on one feature before moving to next
  • Tests are mandatory: Never mark a feature complete without passing tests
  • Follow project docs: CLAUDE.md, DESIGN.md, and ADRs are your requirements
  • CHANGELOG.md is source of truth: Only mark items complete in CHANGELOG.md [Unreleased] section when fully done
  • Be thorough: Each feature should be production-ready, not a stub
  • Ask when uncertain: Use AskUserQuestion for ambiguous requirements
  • Show progress: Keep TodoWrite updated so user sees progress
  • Commit-ready code: Write code that's ready for git commit (clean, tested, working)

Testing Requirements

  • All unit tests must pass before marking feature complete
  • Run tests with: dotnet test
  • If tests fail, fix the implementation or tests, then re-run
  • Unit tests should run quickly (mock external dependencies)
  • Follow existing test organization in the codebase

Example Workflow

1. Read CHANGELOG.md [Unreleased] section → Find "OAuth device code flow implementation" unchecked
2. Create TodoWrite with sub-tasks:
   - Implement DeviceCodeAuthenticator class
   - Add token refresh logic
   - Write unit tests for auth flow
   - Write unit tests for token refresh
3. Implement DeviceCodeAuthenticator
4. Write comprehensive unit tests
5. Run: dotnet build && dotnet test
6. Fix any failures, re-run tests
7. All tests pass → Update CHANGELOG.md [Unreleased]: `- [x] OAuth device code flow...`
8. Move to next feature

Output Format

Always provide clear status updates:

  • "šŸ“‹ Found X incomplete features in CHANGELOG.md [Unreleased]"
  • "šŸ”Ø Working on: [Feature Name]"
  • "āœ… Tests passed for: [Feature Name]"
  • "āœ“ Marked complete in CHANGELOG.md: [Feature Name]"
  • "āž”ļø Moving to next feature: [Feature Name]"
  • "šŸŽ‰ All features complete!"

Critical Success Criteria

A feature is ONLY complete when:

  1. āœ… Implementation code is written and follows project patterns
  2. āœ… Unit tests are written and comprehensive
  3. āœ… dotnet build succeeds with no errors
  4. āœ… dotnet test succeeds with all tests passing
  5. āœ… CHANGELOG.md [Unreleased] checkbox is marked as complete - [x]

Now begin by reading CHANGELOG.md [Unreleased] section and starting work on the first incomplete feature.