Dataface Tasks

Add master plans daily activity page

IDDASHBOARD_FACTORY-ADD_MASTER_PLANS_DAILY_ACTIVITY_PAGE
Statuscompleted
Priorityp1
Milestonem1-ft-analytics-analyst-pilot
Ownerdata-analysis-evangelist-ai-training
Completed bydave
Completed2026-03-13

Problem

Track completed tasks by day with owners, completers, and linked PRs, including merged PRs not tied to tasks.

Context

  • tasks/tools/plans_cli.py currently toggles task status but does not record a completion timestamp or completer in frontmatter.
  • Existing task frontmatter already stores owner, which is useful for assigned owner display but not the person who actually completed the task.
  • The master plans docs site uses MkDocs with the mkdocs-macros-plugin; most dynamic rollups live in tasks/macros.py.
  • Git history on origin/main includes both GitHub merge commits (Merge pull request #...) and squash merge subjects (... (#123)), which is enough to build merged PR links without requiring GitHub API access during docs builds.
  • Recent PRs often modify task files when they mark tasks completed, so task-to-PR association can be inferred from merged commits that touch tasks/workstreams/*/tasks/*.md.

Possible Solutions

  1. Add a dedicated MkDocs plugin that precomputes an activity dataset and writes generated markdown. - Strong separation, but heavier than needed for the current site.
  2. Extend the existing macros layer with a small helper module that reads task frontmatter plus git history at build time and renders a daily activity page. - Recommended: uses the existing master plans architecture, keeps build inputs local to the repo, and avoids adding another MkDocs plugin surface.
  3. Rely entirely on git history for both task completion time and PR association. - Useful as a fallback for historical tasks, but weaker for future accuracy because task completion is a domain event that should live in task metadata.

Plan

  1. Update tasks/tools/plans_cli.py so task complete records completed_at and completed_by in frontmatter, and task start/update keep the metadata consistent.
  2. Add a master plans activity helper that: - loads all tasks and their metadata - uses git history to infer merged PRs and task-to-PR associations - falls back to git commit dates for older completed tasks missing completed_at
  3. Add a new docs page under tasks/ and wire it into MkDocs navigation via the existing macros plugin.
  4. Add focused tests for CLI completion metadata and activity rendering/inference, then run the relevant test subset plus a master plans build.

Implementation Progress

  • Created task scaffold with the plans CLI and set it to in_progress.
  • Verified that current task files do not systematically store completion timestamps.
  • Confirmed merged PRs can be inferred from local git history without adding a network dependency to the build.
  • Added completion metadata handling to plans_cli.py so completed tasks now stamp completed_at and completed_by, while reopened tasks clear stale completion data.
  • Added tasks/activity.py to aggregate completed tasks and merged PRs by day, with git-blame fallback for historical task completion timestamps and git-log-based PR inference.
  • Added the tasks/activity/index.md page, MkDocs nav entry, and activity page styling so the site now exposes a day-by-day delivery log.
  • Added tests covering CLI completion metadata and activity aggregation/rendering.
  • Verified with uv run pytest tests/core/test_plans_cli.py tests/core/test_tasks_macros.py tests/core/test_tasks_activity.py.
  • Verified with PYTHONPATH=tasks uv run mkdocs build -f tasks/mkdocs.yml -d /tmp/master-plans-build.

Review Feedback

  • scripts/pr-validate pre passed after fixing unrelated mypy type issues in dataface/ai/mcp/server.py that were present on top of current main.
  • uv run --project libs/cbox cbox review --model sonnet --review-timeout 900 --watch files ... returned APPROVED on March 13, 2026.
  • The review called out a non-blocking build-time N+1 subprocess pattern in collect_merged_prs; the issue is bounded by MAX_PR_HISTORY and should be handled in follow-up work if activity-page build cost becomes noticeable.

  • [x] Review cleared