home / skills / ladderchaos / tora-skills / repo-maintenance
This skill guides version bumps, changelog updates, deployments, and status tracking to streamline release management for monorepos.
npx playbooks add skill ladderchaos/tora-skills --skill repo-maintenanceReview the files below or copy the command above to add this skill to your agents.
---
name: repo-maintenance
description: Manage repository versioning, releases, deployments, and documentation. Use this skill for version bumps, changelog updates, deployment syncs, status tracking, and release management.
---
# Repo Maintenance
This skill guides repository maintenance tasks including version control, release management, deployment synchronization, and documentation updates for the Sooth Protocol monorepo.
## When to Use This Skill
Invoke this skill when:
- Updating CHANGELOG.md after features, fixes, or deployments
- Bumping version numbers in package.json or config files
- Syncing deployment addresses after contract deploys
- Updating STATUS.md with current project state
- Preparing releases or deployments
- Managing branch workflows and conventional commits
## Core Files
| File | Purpose | Update Frequency |
|------|---------|------------------|
| `CHANGELOG.md` | Release history with breaking changes, fixes, deployments | Per release |
| `STATUS.md` | Live project status, current deployments, pending work | Per session |
| `DECISIONS.md` | Architectural Decision Records (ADRs) | Per major decision |
| `apps/web/src/config/deployments.json` | Canonical contract addresses (source of truth) | Per deployment |
| `apps/web/src/config/markets.json` | Active markets per chain | Per market creation |
| `packages/contracts-evm/package.json` | Contract version (semantic) | Per contract release |
## Version Bump Workflow
### 1. Identify Version Type
| Change Type | Version Bump | Example |
|-------------|--------------|---------|
| Breaking API change | Major (X.0.0) | Interface signature change |
| New feature | Minor (0.X.0) | New contract function |
| Bug fix | Patch (0.0.X) | Logic correction |
### 2. Update Version Files
```bash
# Contract version (packages/contracts-evm/package.json)
# Update "version" field
# Frontend cache invalidation (apps/web/src/config/deployments.json)
# Bump "version" field to force browser refresh
```
### 3. Update CHANGELOG.md
Follow this format:
```markdown
## [X.Y.Z] - YYYY-MM-DD
### ā ļø BREAKING CHANGE
- **Description**: What changed and migration steps
### Fixed
- **Bug Name** (date): Root cause and solution
### Added
- **Feature Name**: Description with test count
### Deployed
- **Network Name VX.Y.Z**:
- **Contract**: `0xAddress`
### Coverage
- X tests passing (Y new)
- ContractName: XX.XX% lines, XX.XX% functions
```
## Deployment Sync Workflow
After any contract deployment:
### 1. Verify On-Chain State (MANDATORY)
```bash
cd packages/contracts-evm
source .env
# Verify core contracts are live
cast call $LAUNCHPAD_ENGINE "owner()" --rpc-url $BASE_SEPOLIA_RPC_URL
cast call $COLLATERALIZER "usdc()" --rpc-url $BASE_SEPOLIA_RPC_URL
cast call $AMM_ENGINE "usdc()" --rpc-url $BASE_SEPOLIA_RPC_URL
# Verify market initialization
cast call $LAUNCHPAD_ENGINE "isInitialized(address)" $MARKET --rpc-url $BASE_SEPOLIA_RPC_URL
```
**STOP if any check fails.**
### 2. Update deployments.json (Canonical Source)
```json
{
"version": "9.1.0", // BUMP THIS to invalidate browser cache
"lastUpdated": "2025-12-29T00:00:00Z",
"networks": {
"84532": {
"name": "Base Sepolia",
"contracts": {
"LaunchpadEngine": "0x...",
"AMMEngine": "0x...",
"TickBookPoolManager": "0x..."
}
}
}
}
```
### 3. Run Sync Script
```bash
./sync-deployments.sh
```
This copies from `apps/web/src/config/deployments.json` to `packages/contracts-evm/deployments.json`.
### 4. Verify Frontend Build
```bash
cd apps/web
npm run build # Runs validate-config.js automatically
```
### 5. Update STATUS.md
Add new deployment addresses to the Active Deployment tables.
### 6. Commit with Conventional Format
```bash
git add apps/web/src/config/deployments.json apps/web/src/config/markets.json STATUS.md CHANGELOG.md
git commit -m "feat(deploy): V9.1.0 to Base Sepolia
- AMMEngine: 0x...
- LaunchpadEngine: 0x...
š¤ Generated with Claude Code"
```
## STATUS.md Update Pattern
Update STATUS.md during each work session:
### Session Start
- Check "Pending Work" section for context
- Review "Active Deployment" tables for current state
### During Session
- Move completed items from "Pending Work" to "Completed This Session"
- Add new pending items as discovered
### Session End
- Update version badges at top if deployment occurred
- Update deployment address tables if contracts changed
- Add session summary at bottom
### Format
```markdown
# Project Status
> Last Updated: YYYY-MM-DD (VX.Y.Z Description)
- **ā
FEATURE DEPLOYED** ā Brief description
- **ā ļø KNOWN ISSUE** ā Brief description with workaround
## š VX.Y.Z Feature Name (YYYY-MM-DD)
**Summary**: What this version adds/fixes
### Contract Changes
| Contract | Change |
|----------|--------|
| **ContractName** | Description of change |
### New Tests (N)
| Test | Priority | Status |
|------|----------|--------|
| `test_Name` | P0 | ā
|
### VX.Y.Z Deployed Addresses (Network)
| Contract | Address |
|----------|---------|
| **ContractName** | `0x...` |
## Pending Work (Next Session)
- [ ] **Task** ā Description with effort estimate (S/M/L)
## Completed This Session (YYYY-MM-DD)
- ā
**Task** ā What was done
```
## Conventional Commits
Use this format for all commits:
```
<type>(<scope>): <description>
[optional body]
š¤ Generated with Claude Code
```
### Types
| Type | Use For |
|------|---------|
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `refactor` | Code change that neither fixes bug nor adds feature |
| `test` | Adding or updating tests |
| `chore` | Maintenance tasks |
| `deploy` | Deployment-related changes (often `feat(deploy):`) |
### Scopes
| Scope | Package/Area |
|-------|--------------|
| `contracts` | packages/contracts-evm |
| `web` | apps/web |
| `deploy` | Deployment configuration |
| `config` | Configuration files |
## Pre-Commit Hook Behavior
The `.husky/pre-commit` hook runs when staging deployment configs:
1. **Deployment Verification**: Runs `./script/verify-deployment.sh` when `deployments.json` or `markets.json` are staged
2. **Version Bump Warning**: Alerts if `deployments.json` changed but version not bumped
If hook fails, fix the issue before committing.
## ADR (Architectural Decision Record) Format
For major decisions, add to DECISIONS.md:
```markdown
## ADR-XXX: Decision Title
**Date**: YYYY-MM-DD
**Status**: Proposed | Accepted | Deprecated | Superseded
### Context
What is the issue that we're seeing that motivates this decision?
### Decision
What is the change that we're proposing and/or doing?
### Consequences
What becomes easier or more difficult because of this change?
```
## Quick Reference Commands
```bash
# Check current versions
cat packages/contracts-evm/package.json | grep version
cat apps/web/src/config/deployments.json | grep version
# Verify deployment
cd packages/contracts-evm && source .env
cast call $LAUNCHPAD_ENGINE "owner()" --rpc-url $BASE_SEPOLIA_RPC_URL
# Sync after deployment
./sync-deployments.sh
# Build to verify config
cd apps/web && npm run build
# View recent commits for message style
git log --oneline -10
```
## Browser Cache Invalidation
After deployment sync, users need to hard refresh:
- **Chrome/Edge**: `Ctrl+Shift+R` (Windows) or `Cmd+Shift+R` (Mac)
- **Firefox**: `Ctrl+F5` (Windows) or `Cmd+Shift+R` (Mac)
The `version` field in `deployments.json` triggers automatic cache invalidation when bumped.
## Multi-Network Deployment
When deploying to multiple networks:
1. Deploy to each network separately
2. Update `deployments.json` with all network addresses
3. Update `markets.json` with markets per chain
4. Bump version once (covers all networks)
5. Document all deployments in CHANGELOG.md
## Effort Estimates
Use these labels for pending work:
- **S (Small)**: < 2 hours
- **M (Medium)**: 2-6 hours
- **L (Large)**: > 6 hours
## Version File Organization
When upgrading to a new major version, archive previous version files to maintain history while keeping the working directory clean.
### Directory Structure
```
copan/
āāā packages/contracts-evm/
ā āāā deployments/
ā ā āāā v9-latest.json # Current version
ā ā āāā v9-baseSepolia.json # Per-network current
ā ā āāā v9-monadTestnet.json
ā ā āāā v8-archive/ # Previous version archive
ā ā āāā v8-latest.json
ā ā āāā v8-baseSepolia.json
ā ā āāā README.md
ā ā
ā āāā docs/
ā ā āāā v9/ # Active version docs
ā ā āāā _archive/ # Archived docs
ā ā āāā v8/
ā ā āāā v7/
ā ā āāā v6/
ā ā
ā āāā test/v9/ # Active version tests
ā āāā archive_tests/ # Archived tests
ā ā āāā v8/
ā ā
ā āāā abi/v9/ # Active ABIs
ā āāā archive_scripts/ # Deprecated scripts
ā
āāā apps/web/
ā āāā src/config/
ā ā āāā deployments.json # Canonical (current)
ā ā āāā markets.json # Current markets
ā āāā archive/ # Frontend archives
ā ā āāā v8/
ā āāā docs/_archive/
ā āāā v8-implementation/
```
### Archive Locations by Artifact Type
| Artifact | Active Location | Archive Pattern |
|----------|-----------------|-----------------|
| **Deployments** | `deployments/v{N}-*.json` | `deployments/v{N-1}-archive/` |
| **Docs** | `docs/v{N}/` | `docs/_archive/v{N-1}/` |
| **Tests** | `test/v{N}/` | `archive_tests/v{N-1}/` |
| **Scripts** | `script/` | `archive_scripts/` |
| **Frontend** | `apps/web/src/` | `apps/web/archive/v{N-1}/` |
| **ABIs** | `abi/v{N}/` | Keep in place (small files) |
### Major Version Upgrade Checklist
When releasing a new major version (e.g., V9 ā V10):
1. **Archive Deployments**
```bash
cd packages/contracts-evm/deployments
mkdir v9-archive
mv v9-*.json v9-archive/
echo "# V9 Archive\nArchived: $(date)\nReason: V10 release" > v9-archive/README.md
```
2. **Archive Version-Specific Docs**
```bash
mv docs/v9 docs/_archive/v9
mkdir docs/v10
```
3. **Archive Version-Specific Tests** (if superseded)
```bash
mkdir -p archive_tests/v9
mv test/v9/* archive_tests/v9/ # Only if tests no longer apply
```
4. **Create New Version Files**
```bash
touch deployments/v10-latest.json
mkdir docs/v10
mkdir test/v10
```
5. **Update package.json**
```json
{
"version": "10.0.0",
"description": "Sooth Protocol V10 EVM Contracts"
}
```
6. **Document in CHANGELOG.md**
```markdown
## [10.0.0] - YYYY-MM-DD
### ā ļø BREAKING CHANGE
- Major architecture change (see docs/v10/)
- V9 contracts archived to deployments/v9-archive/
```
### What NOT to Archive
- **CHANGELOG.md** ā Always append, never archive
- **STATUS.md** ā Rolling document, clear old sessions periodically
- **DECISIONS.md** ā Append ADRs, mark old ones as "Superseded"
- **Core contracts** ā Keep all versions in `contracts/` (git tracks history)
- **Root configs** ā `package.json`, `foundry.toml`, etc. are versioned in git
### Archive README Template
Create a `README.md` in each archive folder:
```markdown
# V{N} Archive
**Archived**: YYYY-MM-DD
**Superseded By**: V{N+1}
**Reason**: [Brief explanation]
## Contents
- `v{N}-latest.json` ā Final deployment addresses
- `v{N}-baseSepolia.json` ā Base Sepolia deployment
- `v{N}-monadTestnet.json` ā Monad deployment
## Historical Context
[Brief summary of what this version implemented]
## Migration Notes
[Any notes for understanding changes to next version]
```
### Quick Archive Commands
```bash
# Archive a version's deployments
VERSION=9
cd packages/contracts-evm/deployments
mkdir v${VERSION}-archive
mv v${VERSION}-*.json v${VERSION}-archive/
# Archive version docs
cd ../docs
mv v${VERSION} _archive/v${VERSION}
# Archive version tests (if applicable)
cd ../
mkdir -p archive_tests/v${VERSION}
mv test/v${VERSION}/* archive_tests/v${VERSION}/
```
This skill automates and documents routine repository maintenance: version bumps, changelog updates, deployment syncs, status tracking, and release management. It codifies workflows for contract releases, frontend cache invalidation, and session-based STATUS updates to keep the monorepo consistent and auditable.
The skill inspects core files such as deployments.json, package.json, CHANGELOG.md, and STATUS.md to determine what needs updating after code or contract changes. It guides verification of on-chain state, enforces a canonical deployment source, runs sync and build steps, and generates conventional commit messages for CI hooks. It also provides archiving and major-version upgrade checklists to minimize manual errors.
What triggers a browser cache invalidation?
Bumping the "version" field in apps/web/src/config/deployments.json triggers cache invalidation; instruct users to hard-refresh their browsers after release.
What if a pre-commit hook fails when staging deployments?
Fix the flagged verification or version mismatch, re-run verification steps (on-chain checks and sync), then stage and commit again.