[AIR-3][AIS-3][BPC-3][RES-3]
Checkpoint System¶
Table of Contents¶
Date: 2025-03-02 Version: 1.0
Overview¶
The checkpoint system provides automated snapshots of repository states at significant points in development, enhancing traceability and facilitating regression testing or rollbacks if needed. Checkpoints are a combination of Git tags and detailed documentation files.
Features¶
- Automated Checkpoint Creation:
- After merges to main branch
- After significant pushes
- After reaching commit thresholds
-
Manual checkpoint creation
-
AI Label Integration:
- Supports AIP (Anya Intelligence Pattern) labels
-
Automatically extracts AI labels from commit messages and PR titles
-
Comprehensive Documentation:
- Commit information
- Files changed
- Repository status at checkpoint time
Using the Checkpoint System¶
Creating Checkpoints Manually¶
## Basic usage
.\scripts\create_checkpoint.ps1 -CheckpointName "feature_completion" -Message "Feature X completed"
## With AI Label
.\scripts\create_checkpoint.ps1 -CheckpointName "feature_completion" -Message "Feature X completed" -AiLabel "AIP-001"
## Push to remote repository
.\scripts\create_checkpoint.ps1 -CheckpointName "feature_completion" -Message "Feature X completed" -AiLabel "AIP-001" -PushToRemote
Automated Checkpoints¶
The system automatically creates checkpoints:
- When a PR is merged to main
- After significant pushes to main
- When commit count reaches a threshold since the last checkpoint
These are controlled by GitHub Actions workflows and local scripts.
Viewing Checkpoints¶
Checkpoints can be viewed in several ways:
-
Git Tags:
-
Documentation Files:
-
Browse to
docs/checkpoints/directory for detailed checkpoint information files -
GitHub Interface:
- View tags in the GitHub repository interface
- View checkpoint files in the GitHub repository
Checkpoint Naming Convention¶
- Manual Checkpoints:
[AI-Label-]<descriptive-name> - Merge Checkpoints:
merge_<branch-name> - Push Checkpoints:
push_<commit-hash> - Commit Threshold Checkpoints:
auto_commit_threshold
AI Label Integration¶
The checkpoint system supports AI labeling following this format:
- AIR-XXX: Anya Intelligence Research
- AIS-XXX: Anya Intelligence Security
- AIT-XXX: Anya Intelligence Testing
- AIM-XXX: Anya Intelligence Metrics
- AIP-XXX: Anya Intelligence Pattern
- AIE-XXX: Anya Intelligence Enhancement
Where XXX is a three-digit number (e.g., AIP-001).
Files and Components¶
- create_checkpoint.ps1:
- Main script for creating checkpoint tags and files
-
Located in the
scriptsdirectory -
auto_checkpoint.ps1:
- Script for automating checkpoint creation based on commit thresholds
-
Located in the
scriptsdirectory -
checkpoint.yml:
- GitHub Actions workflow for automated checkpoint creation
-
Located in
.github/workflowsdirectory -
Checkpoint Files:
- Stored in
docs/checkpointsdirectory - Format:
<checkpoint-name>-<timestamp>.md
Best Practices¶
- Use meaningful names for manual checkpoints
- Include AI labels when applicable
- Push checkpoints to remote for team visibility
- Use checkpoints for rollback references
- Include checkpoint references in issue/ticket tracking
Example Workflow¶
- Developer completes feature implementation
- Creates a PR with appropriate title including AI label if applicable
- PR is reviewed and merged
- Automated checkpoint is created
- The checkpoint tag and file are pushed to the repository
- Team can reference checkpoint in documentation and discussions