Dataface Tasks

Add strict team owner validation and team listing to plans CLI

IDINFRA_TOOLING-ADD_STRICT_TEAM_OWNER_VALIDATION_AND_TEAM_LISTING_TO_PLANS_CLI
Statuscompleted
Priorityp1
Milestonem1-ft-analytics-analyst-pilot
Ownersr-engineer-architect
Completed bydave
Completed2026-03-24

Problem

Require task and initiative owners to resolve to a known person or role under tasks/team, with clear errors for unknown owners. Add team-focused CLI commands to list valid people/roles and show owner mappings so operators can discover allowed values instead of guessing slugs. Keep creation/update flows ergonomic and document the canonical owner model.

Context

Owner field in task/initiative frontmatter accepted any string without validation. Team members and roles are defined in tasks/team/ and tasks/team/roles/ as markdown files with YAML frontmatter. No CLI existed to discover valid owner values.

Possible Solutions

Recommended: Collect valid owners from file stems of tasks/team/*.md (excluding index) and tasks/team/roles/*.md (excluding index). Validate owner at write time (create/update) and at validate time. Add team list and team show CLI commands for discoverability.

Plan

  1. Add _collect_valid_owners() → frozenset of valid owner slugs
  2. Add _validate_owner() that calls _collect_valid_owners() and raises SystemExit on mismatch
  3. Wire validation into task_create, task_update, initiative_create, initiative_update, task_validate
  4. Add team_list() and team_show() functions + parser entries
  5. Tests for all new behavior

Implementation Progress

  • Added _collect_valid_owners(): scans tasks/team/*.md and tasks/team/roles/*.md stems (excluding index)
  • Added _validate_owner(): raises SystemExit with helpful message listing valid owners
  • Wired into all 5 write/validate paths: task_create, task_update, initiative_create, initiative_update, task_validate
  • Added team list command with --people and --roles filters
  • Added team show --slug <slug> command showing frontmatter details for person or role
  • 15 new tests covering owner validation and team commands; all 57 tests pass

QA Exploration

  • [x] N/A — CLI-only changes, no UI

Review Feedback

  • [ ] Review cleared