AdoSprintTimer is a PowerShell 7 project for tracking time against Azure DevOps sprint work items with a local first timer and optional sync back to Azure DevOps Boards.
The intent is to make personal sprint time tracking simple, scriptable, and safe:
- Discover the current sprint from Azure DevOps.
- List work items assigned to the current user.
- Start and stop a local timer against a specific work item.
- Store the time log locally as the source of truth.
- Roll up daily and monthly totals.
- Optionally sync logged time back to Azure DevOps fields and work item history.
This project is meant to produce a reusable PowerShell module named AdoSprintTimer.
The planned module is designed around these core principles:
- Local log data is authoritative.
- Azure DevOps is a sync target, not the timer engine.
- PowerShell 7 is the primary runtime.
- Public commands, private helpers, tests, and docs stay separated.
- Sync behavior defaults to safe, non-destructive options.
The target module is expected to support:
- Connection setup for Azure DevOps organization, project, team, user identity, and PAT.
- Current sprint discovery through Azure DevOps REST APIs.
- Retrieval of sprint work items assigned to the configured user.
- Local timer start and stop operations for a selected work item.
- Local JSON storage under
~/.ado-time/. - Daily and monthly summaries of logged time.
- Optional sync modes for history comments, completed work, and remaining work.
- Pester based validation for storage lifecycle, timer lifecycle, summaries, and sync behavior.
This repository currently contains the project definition and workflow prompts used to generate and implement the module through a GitHub Spec style workflow.
At the moment, the repository contains:
- The root project documentation.
- A prompt workflow under Prompts/README.md.
- Prompt files for requirements, specification, planning, task generation, implementation, audit, fixes, regression testing, release readiness, publishing, post-release monitoring, and system improvement.
- Shared engineering constraints in Prompts/principles.md.
- A local-only planning folder future-upgrades that is excluded from git push via .gitignore.
Current top level contents:
- README.md Project overview and repository guidance.
- Prompts Prompt workflow used to generate and validate the module implementation.
- LICENSE Repository license.
- future-upgrades Local planning notes folder excluded from source control.
Prompt workflow contents:
- Prompts/00-Setup-GitHub-Spec-Foundation.md Sets up the repository for the GitHub Spec workflow.
- Prompts/01-Generate-Requirements.md Generates project requirements.
- Prompts/02-Generate-Formal-Spec.md Produces the formal design spec.
- Prompts/03-Generate-Plan.md Creates the implementation plan.
- Prompts/04-Generate-Tasks.md Breaks the plan into executable tasks.
- Prompts/05-Implement-Tasks.md Implements the module from the generated artifacts.
- Prompts/06-Audit-Implementation.md Audits the implementation against the spec artifacts.
- Prompts/07-Fix-From-Audit.md Applies targeted fixes from the audit.
- Prompts/08-Regression-Test.md Validates the implementation after fixes.
- Prompts/09-Release-Readiness.md Validates production readiness before release.
- Prompts/10-Publish-Module.md Guides packaging and publishing.
- Prompts/11-Post-Release-Monitoring.md Defines post-release operational monitoring.
- Prompts/12-Auto-Improve-System.md Improves the workflow based on outcomes over time.
- Prompts/Generate-Formal-Spec.md Compatibility prompt filename for legacy editor references.
- Prompts/principles.md Defines the engineering and safety constraints for all generated work.
The intended project workflow is:
- Generate requirements.
- Generate the formal spec.
- Generate the implementation plan.
- Generate executable tasks.
- Implement from tasks.
- Audit the result.
- Fix issues found in the audit.
- Run regression validation.
- Validate release readiness.
- Publish module artifacts.
- Monitor behavior post-release.
- Improve the prompt system based on observed outcomes.
The generated artifacts should live under:
specs/001-ado-sprint-timer/
Once those files exist, they become the source of truth for implementation.
The planned AdoSprintTimer module is intended to be:
- Local first.
- Easy to inspect and maintain.
- Friendly to command line workflows.
- Easy to extend later for a tray app, MAUI front end, SQLite backend, or branch based automation.
The design favors plain JSON storage first so the system stays simple and easy to debug before introducing heavier persistence layers.
This project is constrained by the rules in Prompts/principles.md, including:
- Use PowerShell 7.
- Use
Set-StrictMode -Version Latest. - Use
CmdletBindingon all functions. - Return objects rather than formatted output.
- Keep public and private function boundaries clear.
- Handle Azure DevOps process dependent fields defensively.
- Keep sync safe and support
WhatIfandConfirmwhere appropriate. - Maintain test coverage for public behavior.
The project is intended to integrate with Azure DevOps through the REST API for:
- Sprint discovery.
- Team iteration work item retrieval.
- Work item hydration.
- Safe field updates.
- History comment updates.
The expected API approach is:
- Centralized REST helper logic.
- API version
7.1. GETandPATCHsupport.application/json-patch+jsonfor updates.- Defensive handling for missing scheduling fields.
The intended local storage area is:
~/.ado-time/
Expected files:
config.jsonConnection and identity settings.active-timer.jsonThe currently running timer, if one exists.worklog-yyyy-MM.jsonMonthly time entries.
This local data is intended to remain the source of truth even when Azure DevOps sync is enabled.
Project status right now:
- Repository prompt workflow is present.
- Root and prompt documentation are in place.
- The full lifecycle prompt set is present through release and post-release operations.
- The actual module implementation should follow the prompt and spec workflow rather than being improvised directly.
- Compatibility prompt filenames are present for older path references.
If you are working on this repository, start here:
- Read Prompts/README.md.
- Review Prompts/principles.md.
- Generate or update the artifacts under
specs/001-ado-sprint-timer/. - Implement only from those generated artifacts.
- Run audit and regression prompts after implementation changes.
- Run release readiness and publish prompts only after regression passes.
The long term direction for AdoSprintTimer includes:
- A production quality PowerShell module.
- Optional SQLite storage.
- Better sync idempotency tracking.
- Possible tray or desktop UI.
- Branch name to work item mapping.
- VS Code task integration.
AdoSprintTimer is a local first Azure DevOps sprint time tracking project with a PowerShell module target and a spec driven workflow. This repository currently documents and drives that implementation process through the prompt system under Prompts.
Local planning note:
- future-upgrades is intentionally local-only and ignored by git.