You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: separate KB dataset release with auto-download.
Story Statement
As a knowledge-hub maintainer I want KB dataset as separate GitHub release artifact alongside CLI So that KB content is versioned independently while keeping single release workflow
Where: GitHub Releases page - single release with dual artifacts (CLI binaries + KB dataset ZIP)
Refined: Story is detailed, estimated, and ready for development ✅
In Progress: Story is actively being developed ✅
In Review: Pull request created, awaiting code review ✅
Done: Story delivered and accepted
Branch: feature/#72-kb-dataset-release Pull Request: #83 - [US-72] feat: separate KB dataset release with auto-download
Acceptance Criteria
Functional Requirements
Given-When-Then Format:
Given a changeset release workflow executes for version v1.2.3 When the release completes Then a single GitHub release v1.2.3 contains both CLI binaries AND knowledge-base-1.2.3.zip artifact
Given the KB dataset ZIP is created from knowledge-hub/dataset/ When the ZIP is extracted Then the complete directory structure is preserved with all subdirectories (.pair/, .github/, AGENTS.md)
Given a KB dataset ZIP artifact knowledge-base-1.2.3.zip When the ZIP is opened Then it contains manifest.json with version, file list, checksums, and timestamp metadata
Given the release workflow builds artifacts When KB packaging script executes Then it generates manifest.json with version, complete file list with paths, individual file SHA256 checksums, creation timestamp
Given viewing GitHub release page for v1.2.3 When looking at release assets Then both artifact types are present: CLI binaries (linux/macos/windows) AND knowledge-base-1.2.3.zip with knowledge-base-1.2.3.zip.sha256
Given CLI package is installed When KB dataset not found locally Then CLI automatically downloads KB from GitHub release and extracts to ~/.pair/kb/{version}/
Given CLI starts and KB already cached at ~/.pair/kb/{version}/ When CLI resolves KB path Then CLI uses cached KB without re-download
Business Rules
Single release workflow produces both CLI and KB artifacts with same version
KB dataset ZIP MUST include entire knowledge-hub/dataset/ folder with preserved structure
ZIP asset naming MUST follow format: knowledge-base-{version}.zip
Manifest.json MUST be included in ZIP root with complete metadata
SHA256 checksum file MUST be generated for KB ZIP: knowledge-base-{version}.zip.sha256
Both CLI and KB artifacts uploaded to same GitHub release
If KB packaging fails, entire release fails (atomic workflow)
Network Unavailable: CLI fails gracefully with actionable message if cannot download KB
Technical Analysis
Implementation Approach
Technical Strategy: Extend existing single release workflow to produce KB dataset ZIP artifact alongside CLI binaries, exclude KB from CLI bundle, implement minimal auto-download mechanism
Sprint Fit Assessment: Yes - fits in single sprint Development Time Estimate: 3-4 days (script creation, workflow integration, KB manager, testing) Testing Time Estimate: 1-2 days (validation, smoke tests, auto-download tests) Total Effort Assessment: 4-6 days - fits within standard sprint capacity
Story Splitting Recommendations
Not required - story appropriately sized at 6.5 points for single sprint delivery
Dependencies and Coordination
Story Dependencies
Prerequisite Stories: None - foundation story for epic Dependent Stories:
Task ID: T-72.1 Priority: P0 Estimated Hours: 4h Actual Hours: 3h Bounded Context: Knowledge Base Management Status: ✅ Complete
Summary:
Create bash script that packages knowledge-hub dataset into ZIP with preserved directory structure
Task Type: Feature Implementation
Description:
Implement scripts/workflows/release/package-kb-dataset.sh that creates a ZIP archive from packages/knowledge-hub/dataset/ preserving complete directory structure including .pair/, .github/, and root files like AGENTS.md. Script accepts version parameter and outputs to release/knowledge-base-{version}.zip.
Acceptance Criteria:
Completion Criteria:
✅ Primary deliverable: Bash script creates ZIP with preserved structure
✅ Quality standard: Follow bash scripting best practices from tech-stack
✅ Integration requirement: Compatible with changeset version workflow
✅ Verification method: ZIP extraction shows identical directory tree
Technical Requirements:
✅ Functionality: ZIP all contents of packages/knowledge-hub/dataset/ with relative paths
✅ Performance: Complete packaging in <30 seconds for typical dataset
✅ Security: Preserve file permissions in ZIP archive
✅ Compatibility: Works on Linux/macOS build environments
Implementation Notes:
Script created at scripts/workflows/release/package-kb-dataset.sh
Accepts --clean flag to remove previous artifacts (follows package-manual.sh pattern)
Clean-only mode: ./package-kb-dataset.sh --clean (no version required)
Uses absolute paths via PROJECT_ROOT calculation
Validates dataset directory exists before packaging
Task ID: T-72.2 Priority: P0 Estimated Hours: 5h Actual Hours: 4h Bounded Context: Knowledge Base Management Status: ✅ Complete
Summary:
Implement manifest.json generation with version, file list, SHA256 checksums, and timestamp
Task Type: Feature Implementation
Description:
Extend T-72.1 script to generate manifest.json containing: version number, complete file list with relative paths, individual SHA256 checksums for each file, and creation timestamp. Manifest placed in ZIP root before archiving.
Acceptance Criteria:
Completion Criteria:
✅ Primary deliverable: manifest.json with complete metadata in ZIP root
✅ Quality standard: Valid JSON with all required fields
✅ Integration requirement: Manifest generation integrated in packaging script
✅ Verification method: JSON validation and checksum verification
Technical Requirements:
✅ Functionality: Scan all files recursively, compute checksums, generate JSON
✅ Performance: Manifest generation <10 seconds for typical dataset
✅ Security: Accurate checksums for integrity verification
Manifest written to temp file, included in ZIP root
Verified with 431 files, all checksums accurate
Temp file cleanup after ZIP creation
T-72.3: Generate SHA256 checksum file for KB ZIP ✅
Task ID: T-72.3 Priority: P0 Estimated Hours: 2h Actual Hours: 1h Bounded Context: Knowledge Base Management Status: ✅ Complete
Summary:
Generate separate SHA256 checksum file for the KB ZIP artifact
Task Type: Feature Implementation
Description:
Extend T-72.1 script to generate knowledge-base-{version}.zip.sha256 checksum file after ZIP creation. Checksum file contains SHA256 hash for integrity verification during download/installation.
Acceptance Criteria:
Completion Criteria:
✅ Primary deliverable: .sha256 file with ZIP checksum
✅ Quality standard: Standard sha256sum format
✅ Integration requirement: Generated alongside ZIP artifact
✅ Verification method: Checksum verification of ZIP file
Technical Requirements:
✅ Functionality: Compute SHA256 of final ZIP file
✅ Performance: Checksum generation <5 seconds
✅ Security: Accurate hash for integrity verification
✅ Compatibility: Standard sha256sum file format
Implementation Notes:
Checksum generated after ZIP creation using shasum -a 256
Manual verification successful with shasum -a 256 command
T-72.4: Integrate KB packaging into release workflow ✅
Task ID: T-72.4 Priority: P0 Estimated Hours: 3h Actual Hours: 2h Bounded Context: Integration & Process Standardization Status: ✅ Complete
Summary:
Integrate KB packaging script into existing release workflow with atomic failure handling
Task Type: Feature Implementation
Description:
Modify existing release workflow to call KB packaging script after CLI build but before GitHub release creation. Implement atomic failure: if KB packaging fails, entire release workflow must fail with clear error message.
Acceptance Criteria:
Completion Criteria:
✅ Primary deliverable: Workflow calls KB packaging script with version coordination
✅ Integration requirement: Executes after CLI build, before release upload
✅ Verification method: Test workflow with KB packaging failure
Technical Requirements:
✅ Functionality: Sequential workflow execution with error propagation
✅ Performance: Add <1 minute to total release time
✅ Security: No partial releases on KB packaging failure
✅ Compatibility: Works with changeset version coordination
Implementation Notes:
Added KB packaging step to .github/workflows/release.yml after CLI manual packaging
Added workflow artifact upload for KB ZIP and checksum with 30-day retention
Atomic failure guaranteed by bash set -e and GitHub Actions default behavior
KB packaging positioned between CLI packaging and GitHub release upload
Workflow integration complete and tested
T-72.5: Enhance GitHub release upload for dual artifacts ✅
Task ID: T-72.5 Priority: P0 Estimated Hours: 3h Actual Hours: 2h Bounded Context: Integration & Process Standardization Status: ✅ Complete
Summary:
Modify release upload script to upload both CLI binaries and KB ZIP artifacts to same release
Task Type: Feature Implementation
Description:
Enhance scripts/workflows/release/create-github-release.sh to upload KB ZIP and checksum files alongside existing CLI binaries. Ensure all artifacts uploaded to single GitHub release version.
Acceptance Criteria:
Completion Criteria:
✅ Primary deliverable: Upload script handles CLI + KB artifacts in single release
✅ Quality standard: Sequential upload with error handling
✅ Integration requirement: All artifacts in same release version
✅ Verification method: GitHub release page shows all artifacts
Technical Requirements:
✅ Functionality: Upload multiple artifact types to single release
✅ Performance: Artifact uploads complete within GitHub API limits
✅ Security: Secure artifact upload with proper authentication
✅ Compatibility: Works with existing CLI binary upload process
Implementation Notes:
Extended create-github-release.sh to include KB artifact uploads
KB ZIP and checksum uploaded using existing upload_asset() helper
Release notes include KB dataset section with download links and contents description
All artifacts verified uploaded to same release tag
T-72.6: Add dataset size validation with warnings ✅
Task ID: T-72.6 Priority: P1 Estimated Hours: 2h Actual Hours: 1h Bounded Context: Knowledge Base Management Status: ✅ Complete
Summary:
Add dataset size validation before ZIP creation with threshold warnings
Task Type: Feature Implementation
Description:
Extend KB packaging script to check dataset directory size before ZIP creation. Warn if size exceeds threshold (>50MB). Log size information for monitoring. Non-blocking warning, packaging continues.
Acceptance Criteria:
Completion Criteria:
✅ Primary deliverable: Size validation with warning output
✅ Quality standard: Accurate size calculation and threshold check
✅ Integration requirement: Runs before ZIP creation in T-72.1 script
✅ Verification method: Test with large dataset, verify warning displayed
Technical Requirements:
✅ Functionality: Calculate directory size, compare to threshold, log warning
✅ Performance: Size calculation <5 seconds
✅ Security: None required
✅ Compatibility: Works on Linux/macOS environments
Implementation Notes:
Size calculation using du -sh and du -sm for human-readable and MB values
50MB threshold check with non-blocking warning
Always displays dataset size in output
Warning message suggests optimization for faster downloads
Current dataset: 5.7M (well below threshold)
Warning tested with hypothetical large dataset scenario
T-72.7: Create tests and update documentation ✅
Task ID: T-72.7 Priority: P0 Estimated Hours: 4h Actual Hours: 3h Bounded Context: Knowledge Base Management Status: ✅ Complete
Summary:
Implement e2e tests and update release workflow documentation
Task Type: Testing & Documentation
Description:
Create e2e tests for KB availability scenarios (unavailability, fallback path exercise). Update release workflow documentation with KB packaging step details and overall release process overview including KB integration.
"fails gracefully when KB not available anywhere" - verifies error handling
"exercises KB manager fallback path when no local KB available" - verifies fallback attempt
Manual Testing: ✅
Documentation reviewed and comprehensive
All tests passing: 134/134 total
Quality Gate:
✅ All tests passing: 134/134 (includes 2 new KB e2e tests)
✅ Documentation complete and comprehensive
✅ KB manager behavior documented with examples
Notes:
E2E tests limited by InMemoryFileSystemService (cannot fully simulate KB cache hit), but comprehensive unit test coverage exists in kb-manager.test.ts (17/17 tests). Documentation provides clear guidance for KB manager behavior across all scenarios.
Description:
Remove KB dataset from CLI bundle by excluding packages/knowledge-hub/dataset/ from package-manual.sh. Implement minimal KB manager in CLI to auto-download KB ZIP from GitHub releases on first run if not cached. Update path resolution to use externally cached KB location at ~/.pair/kb/{version}/. No progress bar, no resume support, no custom flags (deferred to #78).
Acceptance Criteria:
Completion Criteria:
✅ Primary deliverable: CLI bundle excludes KB dataset, auto-downloads from GitHub release on first run
✅ Quality standard: Simple, reliable download with clear error messages
✅ Integration requirement: Works seamlessly for end users, transparent download
✅ Verification method: CLI runs without bundled KB, downloads KB on first use, reuses cached KB
Technical Requirements:
✅ Functionality: Auto-download KB on first run, extract to ~/.pair/kb/{version}/, cache reuse
✅ Performance: Simple download (no progress bar), extract <30s for typical KB
Resolution
Delivered by PR #83 (merged). Board: Done.
feat: separate KB dataset release with auto-download.
Story Statement
As a knowledge-hub maintainer
I want KB dataset as separate GitHub release artifact alongside CLI
So that KB content is versioned independently while keeping single release workflow
Where: GitHub Releases page - single release with dual artifacts (CLI binaries + KB dataset ZIP)
Epic Context
Parent Epic: #65 Enhanced CLI Packaging & Distribution
Status: Code Review ✅
Priority: P0 (Must-Have)
Status Workflow
Branch:
feature/#72-kb-dataset-releasePull Request: #83 - [US-72] feat: separate KB dataset release with auto-download
Acceptance Criteria
Functional Requirements
Given-When-Then Format:
Given a changeset release workflow executes for version
v1.2.3When the release completes
Then a single GitHub release
v1.2.3contains both CLI binaries ANDknowledge-base-1.2.3.zipartifactGiven the KB dataset ZIP is created from
knowledge-hub/dataset/When the ZIP is extracted
Then the complete directory structure is preserved with all subdirectories (
.pair/,.github/,AGENTS.md)Given a KB dataset ZIP artifact
knowledge-base-1.2.3.zipWhen the ZIP is opened
Then it contains
manifest.jsonwith version, file list, checksums, and timestamp metadataGiven the release workflow builds artifacts
When KB packaging script executes
Then it generates
manifest.jsonwith version, complete file list with paths, individual file SHA256 checksums, creation timestampGiven viewing GitHub release page for
v1.2.3When looking at release assets
Then both artifact types are present: CLI binaries (linux/macos/windows) AND
knowledge-base-1.2.3.zipwithknowledge-base-1.2.3.zip.sha256Given CLI package is installed
When KB dataset not found locally
Then CLI automatically downloads KB from GitHub release and extracts to
~/.pair/kb/{version}/Given CLI starts and KB already cached at
~/.pair/kb/{version}/When CLI resolves KB path
Then CLI uses cached KB without re-download
Business Rules
knowledge-hub/dataset/folder with preserved structureknowledge-base-{version}.zipknowledge-base-{version}.zip.sha256~/.pair/kb/{version}/for reuse across projectsEdge Cases and Error Handling
knowledge-hub/dataset/exists and contains expected structure before packagingTechnical Analysis
Implementation Approach
Technical Strategy: Extend existing single release workflow to produce KB dataset ZIP artifact alongside CLI binaries, exclude KB from CLI bundle, implement minimal auto-download mechanism
Key Components:
KB Packaging Script (
scripts/workflows/release/package-kb-dataset.sh)knowledge-hub/dataset/release/knowledge-base-{version}.zipManifest Generator
Release Workflow Enhancement
CLI Bundle Modification
packages/knowledge-hub/dataset/from package-manual.shMinimal KB Manager (new)
~/.pair/kb/{version}/Path Resolution Update
~/.pair/kb/{version}/firstData Flow:
1.2.3release/knowledge-base-1.2.3.zip+ manifestv1.2.3contains all artifacts~/.pair/kb/1.2.3/Integration Points:
scripts/workflows/release/create-github-release.shfor artifact uploadTechnical Requirements
knowledge-base-{version}.zip~/.pair/kb/{version}/with version isolationTechnical Risks and Mitigation
Spike Requirements
No spikes required - straightforward addition to existing release workflow plus minimal download logic
Definition of Done Checklist
Development Completion
scripts/workflows/release/package-kb-dataset.shknowledge-hub/dataset/preserving full directory structurecreate-github-release.shuploads KB ZIP + checksum to same release as CLI binaries~/.pair/kb/{version}/cacheQuality Assurance
Deployment and Release
Story Sizing and Sprint Readiness
Refined Story Points
Final Story Points: 6.5
Confidence Level: High
Sizing Justification:
Sprint Capacity Validation
Sprint Fit Assessment: Yes - fits in single sprint
Development Time Estimate: 3-4 days (script creation, workflow integration, KB manager, testing)
Testing Time Estimate: 1-2 days (validation, smoke tests, auto-download tests)
Total Effort Assessment: 4-6 days - fits within standard sprint capacity
Story Splitting Recommendations
Not required - story appropriately sized at 6.5 points for single sprint delivery
Dependencies and Coordination
Story Dependencies
Prerequisite Stories: None - foundation story for epic
Dependent Stories:
--url, flags)Shared Components:
scripts/workflows/release/workflowTeam Coordination
Development Roles Involved:
External Dependencies
Infrastructure Requirements:
Validation and Testing Strategy
Acceptance Testing Approach
Testing Methods:
Test Data Requirements:
Environment Requirements:
Notes and Additional Context
Refinement Session Insights:
Technical Decisions:
--cleanflag followspackage-manual.shpattern for consistency~/.pair/kb/{version}/for version isolationImplementation Notes:
--cleanflag implemented: removesrelease/knowledge-base-*.zip*artifacts./package-kb-dataset.sh --clean(no version)Future Considerations:
--urlcustom,--no-kbflagTask Breakdown
Task List
Story Status: 8/8 tasks complete (100%) ✅
Branch:
feature/#72-kb-dataset-releasePull Request: #83 - Awaiting code review
T-72.1: Create KB packaging bash script ✅
Task ID: T-72.1
Priority: P0
Estimated Hours: 4h
Actual Hours: 3h
Bounded Context: Knowledge Base Management
Status: ✅ Complete
Summary:
Create bash script that packages knowledge-hub dataset into ZIP with preserved directory structure
Task Type: Feature Implementation
Description:
Implement
scripts/workflows/release/package-kb-dataset.shthat creates a ZIP archive frompackages/knowledge-hub/dataset/preserving complete directory structure including.pair/,.github/, and root files likeAGENTS.md. Script accepts version parameter and outputs torelease/knowledge-base-{version}.zip.Acceptance Criteria:
Completion Criteria:
Technical Requirements:
packages/knowledge-hub/dataset/with relative pathsImplementation Notes:
scripts/workflows/release/package-kb-dataset.sh--cleanflag to remove previous artifacts (followspackage-manual.shpattern)./package-kb-dataset.sh --clean(no version required)PROJECT_ROOTcalculationrelease/directory if not presentT-72.2: Implement manifest.json generation logic ✅
Task ID: T-72.2
Priority: P0
Estimated Hours: 5h
Actual Hours: 4h
Bounded Context: Knowledge Base Management
Status: ✅ Complete
Summary:
Implement manifest.json generation with version, file list, SHA256 checksums, and timestamp
Task Type: Feature Implementation
Description:
Extend T-72.1 script to generate manifest.json containing: version number, complete file list with relative paths, individual SHA256 checksums for each file, and creation timestamp. Manifest placed in ZIP root before archiving.
Acceptance Criteria:
Completion Criteria:
Technical Requirements:
Implementation Notes:
findcommandshasum -a 256{"version": "...", "timestamp": "...", "files": [{"path": "...", "sha256": "..."}]}T-72.3: Generate SHA256 checksum file for KB ZIP ✅
Task ID: T-72.3
Priority: P0
Estimated Hours: 2h
Actual Hours: 1h
Bounded Context: Knowledge Base Management
Status: ✅ Complete
Summary:
Generate separate SHA256 checksum file for the KB ZIP artifact
Task Type: Feature Implementation
Description:
Extend T-72.1 script to generate
knowledge-base-{version}.zip.sha256checksum file after ZIP creation. Checksum file contains SHA256 hash for integrity verification during download/installation.Acceptance Criteria:
Completion Criteria:
Technical Requirements:
Implementation Notes:
shasum -a 256<hash> knowledge-base-{version}.zipknowledge-base-{version}.zip.sha256b0126d5125a785f0fe608fc8325edf226ec4770923bc656499a9d00d7d4d1a0bshasum -a 256commandT-72.4: Integrate KB packaging into release workflow ✅
Task ID: T-72.4
Priority: P0
Estimated Hours: 3h
Actual Hours: 2h
Bounded Context: Integration & Process Standardization
Status: ✅ Complete
Summary:
Integrate KB packaging script into existing release workflow with atomic failure handling
Task Type: Feature Implementation
Description:
Modify existing release workflow to call KB packaging script after CLI build but before GitHub release creation. Implement atomic failure: if KB packaging fails, entire release workflow must fail with clear error message.
Acceptance Criteria:
Completion Criteria:
Technical Requirements:
Implementation Notes:
.github/workflows/release.ymlafter CLI manual packagingset -eand GitHub Actions default behaviorT-72.5: Enhance GitHub release upload for dual artifacts ✅
Task ID: T-72.5
Priority: P0
Estimated Hours: 3h
Actual Hours: 2h
Bounded Context: Integration & Process Standardization
Status: ✅ Complete
Summary:
Modify release upload script to upload both CLI binaries and KB ZIP artifacts to same release
Task Type: Feature Implementation
Description:
Enhance
scripts/workflows/release/create-github-release.shto upload KB ZIP and checksum files alongside existing CLI binaries. Ensure all artifacts uploaded to single GitHub release version.Acceptance Criteria:
Completion Criteria:
Technical Requirements:
Implementation Notes:
create-github-release.shto include KB artifact uploadsupload_asset()helperT-72.6: Add dataset size validation with warnings ✅
Task ID: T-72.6
Priority: P1
Estimated Hours: 2h
Actual Hours: 1h
Bounded Context: Knowledge Base Management
Status: ✅ Complete
Summary:
Add dataset size validation before ZIP creation with threshold warnings
Task Type: Feature Implementation
Description:
Extend KB packaging script to check dataset directory size before ZIP creation. Warn if size exceeds threshold (>50MB). Log size information for monitoring. Non-blocking warning, packaging continues.
Acceptance Criteria:
Completion Criteria:
Technical Requirements:
Implementation Notes:
du -shanddu -smfor human-readable and MB valuesT-72.7: Create tests and update documentation ✅
Task ID: T-72.7
Priority: P0
Estimated Hours: 4h
Actual Hours: 3h
Bounded Context: Knowledge Base Management
Status: ✅ Complete
Summary:
Implement e2e tests and update release workflow documentation
Task Type: Testing & Documentation
Description:
Create e2e tests for KB availability scenarios (unavailability, fallback path exercise). Update release workflow documentation with KB packaging step details and overall release process overview including KB integration.
Acceptance Criteria:
Completion Criteria:
Technical Requirements:
Implementation Approach:
Technical Design:
E2E tests using vitest for KB availability scenarios, comprehensive documentation of release process
Files Modified/Created:
apps/pair-cli/src/cli.e2e.test.ts- Added 2 KB availability testsscripts/workflows/release/README.md- Added KB Manager & Auto-Download Behavior sectionDocumentation Requirements:
KB Manager & Auto-Download Behavior:
Overall Release Process Overview:
Testing Strategy:
E2E Tests: ✅
Manual Testing: ✅
Quality Gate:
Notes:
E2E tests limited by InMemoryFileSystemService (cannot fully simulate KB cache hit), but comprehensive unit test coverage exists in kb-manager.test.ts (17/17 tests). Documentation provides clear guidance for KB manager behavior across all scenarios.
T-72.8: Remove KB from CLI bundle + implement minimal auto-download ✅
Task ID: T-72.8
Priority: P0
Estimated Hours: 3h
Actual Hours: 4h
Bounded Context: Knowledge Base Management, CLI Architecture
Status: ✅ Complete
Summary:
Exclude KB dataset from CLI bundle and implement minimal auto-download mechanism
Task Type: Feature Implementation (Architecture Change)
Description:
Remove KB dataset from CLI bundle by excluding
packages/knowledge-hub/dataset/frompackage-manual.sh. Implement minimal KB manager in CLI to auto-download KB ZIP from GitHub releases on first run if not cached. Update path resolution to use externally cached KB location at~/.pair/kb/{version}/. No progress bar, no resume support, no custom flags (deferred to #78).Acceptance Criteria:
Completion Criteria:
Technical Requirements:
~/.pair/kb/{version}/, cache reuseImplementation Approach:
Technical Design:
package-manual.sh) ✅apps/pair-cli/src/kb-manager.ts) ✅~/.pair/kb/{version}/cache ✅Files Modified/Created:
scripts/workflows/release/package-manual.sh- Commented out dataset copy (lines 201-208)apps/pair-cli/src/kb-manager.ts- KB manager with download & cache (197 lines, 17/17 tests)apps/pair-cli/src/kb-manager.test.ts- Unit tests (17/17 passing)apps/pair-cli/src/config-utils.ts- Added getKnowledgeHubDatasetPathWithFallbackapps/pair-cli/src/config-utils.test.ts- Added KB fallback tests (21/21 passing)apps/pair-cli/src/cli.ts- Added ensureKBAvailableOnStartup async functionapps/pair-cli/src/cli.test.ts- Added KB manager integration test (6/6 passing)apps/pair-cli/test-utils/http-mocks.ts- HTTP mocks for testing (new)apps/pair-cli/test-utils/test-setup.ts- Test setup helpers (new)apps/pair-cli/package.json- Added adm-zip, @types/adm-zip, @types/fs-extra dependenciesTesting Strategy:
Unit Tests: ✅
Integration Tests: ✅
Quality Gate:
Notes:
--urlcustom, no--no-kbflag (all deferred to CLI Default KB Installation #78)~/.pair/kb/{version}/allows version isolation