Skip to content

[CRD] Task Context Validation System #26

@charleslbryant

Description

@charleslbryant

Parent PRD

User Story

As a CMDS AI agent, I want systematic task validation before beginning any work so that I never work on incorrect, completed, or misaligned tasks.

Problem Statement

Agents currently lack systematic validation of task context before beginning work, leading to situations where they may:

Acceptance Criteria

  • Agents must validate current task before beginning any work mode
  • System detects and prevents work on completed/cancelled issues
  • Active session task alignment is verified against GitHub issue state
  • Clear validation failure messages guide corrective actions
  • Integration with all CMDS mode entry points (begin, plan, design, dev, deliver, qa)
  • GitHub issue status cross-reference functionality
  • Branch alignment validation (current branch matches assigned task)

Technical Requirements

Pre-Work Validation

  • Check GitHub issue status (open/closed/cancelled)
  • Verify issue assignment to current operator
  • Confirm issue priority (should be "now" for active work)
  • Validate branch alignment with task

Active Session Validation

  • Continuous monitoring of task context alignment
  • Detection of external issue status changes
  • Validation of session context file consistency
  • Cross-reference with ACTIVE_SESSION.md task information

Error Handling

  • Clear error messages for validation failures
  • Guidance for resolving context misalignment
  • Fallback procedures for validation system failures
  • Manual override capabilities for edge cases

Implementation Tasks

  • Create task validation module
  • Integrate with mode entry points
  • Add GitHub issue status checking
  • Implement branch alignment validation
  • Create error messaging system
  • Add validation to session startup
  • Test with all workflow modes
  • Document validation procedures

Testing Strategy

  • Test with completed issues (should block work)
  • Test with unassigned issues (should require assignment)
  • Test with wrong branch context (should detect misalignment)
  • Test with cancelled issues (should prevent work)
  • Test validation system failure scenarios

Dependencies

  • GitHub API access for issue status checking
  • Session context file structure
  • Mode system integration points
  • Git branch detection capabilities

Timeline

  • Design: 1 session
  • Implementation: 2-3 sessions
  • Testing: 1 session
  • Documentation: 1 session

Definition of Done

  • Validation system prevents all identified context confusion scenarios
  • All modes include pre-work validation
  • Error messages provide clear guidance
  • System tested with representative scenarios
  • Documentation updated with validation procedures
  • Integration with existing CMDS workflow complete

Part of PRD #25 - addresses the core issue that led to task confusion during Issue #16 design session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    crdChange Request DocumentfeatureNew feature developmentnextReady for work after current

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions