Skip to content

Integrate validation and locking into PM commands #6

@t3chn

Description

@t3chn

Task: Integrate validation and locking into PM commands

Description

Wire validation scripts and locking mechanisms into existing PM commands, and replace GitHub CLI calls with rate-limit-safe wrapper in bulk operations.

Acceptance Criteria

  • Add frontmatter validation to /pm:epic-sync before GitHub operations
  • Add frontmatter validation to /pm:sync before GitHub operations
  • Add frontmatter validation to /pm:validate command
  • Wrap /pm:issue-start with file locking using issue ID
  • Replace gh calls with gh_safe in /pm:epic-sync
  • Replace gh calls with gh_safe in /pm:sync
  • Replace gh calls with gh_safe in /pm:epic-oneshot
  • Lock acquisition/release properly handles errors and cleanup
  • Validation failures prevent GitHub sync operations
  • All existing command signatures remain unchanged

Technical Details

Implementation approach:

  • Add validation prolog to sync commands before any GitHub operations
  • Wrap issue-start with lock acquire at beginning and release at end/error
  • Replace gh command calls with gh_safe in bulk operation scripts
  • Ensure proper error handling and cleanup for all integrations

Key considerations:

  • Backward compatibility: no changes to command interfaces
  • Proper error propagation from validation and locking
  • Lock cleanup on script interruption (trap handlers)
  • Integration points must be minimal and non-invasive

Code locations/files affected:

  • Modify: .claude/scripts/pm/epic-sync.sh
  • Modify: .claude/scripts/pm/sync.sh
  • Modify: .claude/scripts/pm/validate.sh
  • Modify: .claude/scripts/pm/issue-start.sh
  • Modify: .claude/scripts/pm/epic-oneshot.sh

Dependencies

  • Task 001: validate-frontmatter.sh must be completed and tested
  • Task 002: lock script must be completed and tested
  • Task 003: gh_safe wrapper must be completed and tested
  • Understanding of existing PM command implementations
  • Testing environment with GitHub API access

Effort Estimate

  • Size: M
  • Hours: 2 hours
  • Parallel: false (depends on core scripts being completed)

Definition of Done

  • All PM commands integrate validation and locking as specified
  • Integration preserves existing command behavior and signatures
  • Error handling properly propagates failures and cleans up locks
  • Manual testing of each modified command verifies functionality
  • Validation failures properly prevent GitHub operations
  • Lock conflicts properly prevent concurrent issue operations
  • gh_safe integration eliminates rate limit failures in bulk operations
  • Rollback capability verified (removal of integration lines)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions