Help us improve
Share bugs, ideas, or general feedback.
From claude-harness
Saves session progress by committing changes, pushing to remote, creating/updating pull requests, persisting decisions/patterns to memory layers, compiling briefings, and archiving features. Use for checkpointing work or PRs.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-agent-framework --plugin panayiotism-claude-harnessHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-harness:checkpointThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a checkpoint of the current session: commit, push, PR, memory persistence, and feature archival.
Wraps up a work session by recording changed files, caveats, decisions, and next steps so a fresh session can resume without re-deriving context.
Closes out a session cleanly by reviewing work, updating project tracking files, committing changes, and capturing session knowledge. Use when a task is complete with no passoff needed.
Initializes Claude Code sessions by migrating legacy harness files to .claude-harness/, creating missing state files like memory rules and config, and preparing GitHub sync.
Share bugs, ideas, or general feedback.
Create a checkpoint of the current session: commit, push, PR, memory persistence, and feature archival.
Arguments: $ARGUMENTS
FEATURES_FILE=".claude-harness/features/active.json"ARCHIVE_FILE=".claude-harness/features/archive.json"MEMORY_DIR=".claude-harness/memory/"PROGRESS_FILE=".claude-harness/claude-progress.json"SESSION_DIR=".claude-harness/sessions/{session-id}/"${PROGRESS_FILE} with:
Session Paths: All session-specific state uses .claude-harness/sessions/{session-id}/. The session ID is provided by the SessionStart hook.
1.5. Update session-scoped working context .claude-harness/sessions/{session-id}/working-context.json with current working state:
${FEATURES_FILE} (from main repo in worktree mode) to identify active feature (first with passes=false)activeFeature to the feature ID and summary to feature nameworkingFiles from:
relatedFiles arraygit status (modified/new)decisions with key architectural/implementation decisions madecodebaseUnderstanding with insights about relevant code areasnextSteps to immediate actionable itemslastUpdated timestampKeep concise: ~25-40 lines total. This will be loaded on session resume.
Example output:
{
"version": 1,
"lastUpdated": "2025-12-29T16:00:00.000Z",
"activeFeature": "feature-003",
"summary": "Add Google OAuth login",
"workingFiles": {
"src/auth/google.ts": "new - OAuth provider implementation",
"src/auth/index.ts": "modified - added Google to provider registry",
"prisma/schema.prisma": "modified - added Account model"
},
"decisions": [
"Store tokens in DB, not cookies",
"Separate Account model linked to User"
],
"codebaseUnderstanding": {
"authSystem": "Uses provider registry pattern, withAuth() middleware"
},
"nextSteps": [
"Add error handling for token revocation",
"Test OAuth callback flow"
]
}
1.6. Persist session decisions to episodic memory:
${MEMORY_DIR}/episodic/decisions.json (from main repo in worktree mode){
"id": "{uuid}",
"timestamp": "{ISO timestamp}",
"feature": "{feature-id}",
"decision": "{what was decided}",
"rationale": "{why this decision was made}",
"alternatives": ["{other options considered}"],
"impact": "{files or areas affected}"
}
maxEntries (default 50), remove oldest entries (FIFO)1.7. Update semantic memory with discovered patterns:
${MEMORY_DIR}/semantic/architecture.json (from main repo in worktree mode)structure.entryPoints, structure.components, etc.patterns.naming with discovered naming conventionspatterns.fileOrganization with discovered structurespatterns.codeStyle with observed patternslastUpdated to current timestamp1.8. Update semantic entities (if new concepts discovered):
${MEMORY_DIR}/semantic/entities.json (from main repo in worktree mode)1.9. Update procedural patterns:
${MEMORY_DIR}/procedural/patterns.json (from main repo in worktree mode)1.9.5. Write persistent session briefing to .claude-harness/session-briefing.md:
/start# Session Briefing
Last updated: {ISO timestamp}
## Active Features
- {id}: {name} [{status}]
{one-line description}
Acceptance: {N} scenarios | Files: {relatedFiles summary}
## Recent Decisions (last 5)
- {decision} ({feature}, {date})
## Approaches to AVOID
- {approach} -> {rootCause} ({feature})
## Learned Rules
- {title}: {description}
## Current Status
Last checkpoint: {commit message summary}
Branch: {current branch}
Next steps: {from working-context nextSteps}
${FEATURES_FILE}, ${MEMORY_DIR}/episodic/decisions.json, ${MEMORY_DIR}/procedural/failures.json, ${MEMORY_DIR}/learned/rules.json/clear, and machine reboots1.10. Auto-reflect is now always enabled (part of UX simplification):
1.11. Run reflection with auto mode:
minConfidenceForAuto:
${MEMORY_DIR}/learned/rules.json1.12. Report auto-reflect results (if rules extracted):
AUTO-REFLECTION
High-confidence rules auto-saved: {N}
- {rule title}
- {rule title}
Lower-confidence (manual review needed): {N}
(Low-confidence rules queued for next checkpoint review)
1.13. If no corrections detected:
git add .claude-harness/ (sessions/ and working/ are gitignored, so only persistent state is staged)git add -A (except secrets/env files).claude-harness/sessions/{session-id}/loop-state.json.claude-harness/loops/state.jsontype is "fix": Use fix({linkedTo.featureId}): <description> prefixtype is "feature" or undefined: Use feat({feature-id}): <description> prefixFixes #{fix-issue-number} and Related to #{original-issue-number}If on a feature/fix branch and GitHub MCP is available:
github.owner and github.repoREMOTE_URL=$(git remote get-url origin 2>/dev/null)
# SSH: git@github.com:owner/repo.git -> owner, repo
# HTTPS: https://github.com/owner/repo.git -> owner, repo
feat: <description>fix: <description>refactor: <description> for refactoringdocs: <description> for documentationstatus:ready-for-reviewbugfix + linked-to:{feature-id} + status:ready-for-review${FEATURES_FILE} features array with prNumber${FEATURES_FILE} fixes array with prNumberPR Title Convention (Conventional Commits):
feat: New feature (triggers MINOR version bump)fix: Bug fix (triggers PATCH version bump)refactor: Code refactoringdocs: Documentationtest: Testschore: Maintenance.claude-harness/sessions/{session-id}/loop-state.json.claude-harness/loops/state.jsonstatus is "completed" and matches current feature/fix:
TaskList to find feature's tasksTaskUpdate to mark as "completed"schemas/loop-state.schema.json for canonical shape):
{
"version": 9,
"feature": null,
"featureName": null,
"type": "feature",
"linkedTo": null,
"status": "idle",
"attempt": 0,
"maxAttempts": 15,
"startedAt": null,
"lastAttemptAt": null,
"verification": {},
"history": [],
"tasks": {
"enabled": false,
"chain": [],
"current": null,
"completed": []
},
"lastCheckpoint": "{commit-hash}",
"escalationRequested": false
}
Archive completed features and fixes:
${FEATURES_FILE} (from main repo in worktree mode)Archive features:
${ARCHIVE_FILE} (create if missing with {"version":3,"archived":[],"archivedFixes":[]})archived[] arrayArchive fixes:
Find all fixes with status="passing"
If any completed fixes exist:
archivedFixes[] arrayReport: "Archived X completed fixes"
Write updated ${FEATURES_FILE} and ${ARCHIVE_FILE}
Read .claude-harness/agents/context.json (or legacy agent-context.json)
Skip if no currentSession or no agentResults
For each entry in agentResults:
${MEMORY_DIR}/procedural/successes.json${MEMORY_DIR}/procedural/failures.jsonIf sharedState.discoveredPatterns has new entries:
${MEMORY_DIR}/procedural/patterns.jsonIf architecturalDecisions has entries:
${MEMORY_DIR}/episodic/decisions.jsonClear agentResults array (already persisted to memory)
Set currentSession to null
Update lastUpdated timestamp
If teamState is non-null (Agent Teams was active):
agentResults (if not already there)teamState to null (team cleanup complete)Write updated files
Report: "Persisted {N} agent results to procedural memory"
Display context management recommendation:
CHECKPOINT COMPLETE
Progress saved to memory layers
Commit: {hash}
PR: #{number} (if applicable)
RECOMMENDED: Run /clear to reset context
Your progress is preserved in:
- claude-progress.json (session summary)
- sessions/{id}/context.json (session working state)
- memory/episodic/decisions.json (decisions)
- memory/procedural/ (successes & failures)
- memory/learned/rules.json (learned rules)
- session-briefing.md (auto-injected at next start)
Fresh context = better performance on next task.
Context auto-loads on next session (no /start needed).
Why clear context?
NOTE: In --autonomous mode, context isolation is handled automatically
via subagent-per-feature delegation. Each feature runs in a fresh context
window -- no manual /clear needed between features.