skills/migrate-harness/SKILL.md
Migrate project scaffolding to match the latest harness version. Adds new directories (memory/, scratch/), new harness.yaml fields, and suggests AGENTS.md updates. For plugin users this handles what a plugin update cannot — project-level structure changes. For git-clone users this also updates copied skill files.
npx skillsauth add alchemishty/agent-harness migrate-harnessInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Migrate a harness-managed project's scaffolding to match the latest harness version. A plugin update gives you the latest skill logic automatically, but it cannot retroactively create directories, add schema fields, or update project docs. This skill handles those project-level migrations.
For git-clone users, this also updates skill files in .claude/commands/ (since those are copied, not loaded from the plugin).
Core principle: Skills are harness-owned — replace wholesale. Config and docs are project-owned — merge carefully or skip.
Use the same detection logic as /install-harness:
../agent-harness/ exists relative to the current working directory.~/agent-harness/ exists.AGENT_HARNESS_PATH is set and points to a valid directory.If any are detected, present the path and ask the user to confirm or provide an alternative.
Store the confirmed path as HARNESS_PATH.
Check that HARNESS_PATH contains:
HARNESS_PATH/skills/ directoryHARNESS_PATH/references/ directoryHARNESS_PATH/enforcement/ directoryHARNESS_PATH/hooks/ directoryHARNESS_PATH/harness.schema.yaml fileIf anything is missing, report and stop.
Check that the current project has:
harness.yaml in the project root.claude/commands/ directory with at least one skill fileAGENTS.md in the project rootIf these are missing, this project was not set up with the harness. Tell the user:
This project does not appear to have an existing harness installation. Run
/install-harnessinstead.
Stop. Do not proceed.
Compare skills in HARNESS_PATH/skills/ against .claude/commands/ and .claude/agents/.
Each skill in the harness is in a subdirectory with a SKILL.md file (e.g., skills/implement-feature/SKILL.md). In the project, skills are flat files (e.g., .claude/commands/implement-feature.md).
Exclude bootstrap-only skills that are never copied to projects:
install-harnessbootstrap-greenfieldbootstrap-existingmigrate-harnessFor each remaining skill subdirectory in the harness, compare HARNESS_PATH/skills/<name>/SKILL.md against .claude/commands/<name>.md:
.md in the projectSpecial handling for project-structure-validator: compare against .claude/agents/project-structure-validator.md instead of .claude/commands/.
Present the diff summary:
## Harness Update Summary
### New skills (will be added):
- retrospective.md — Post-implementation and post-review learning capture
### Modified skills (will be updated):
- implement-feature.md — [briefly describe what changed, e.g., "added context engineering: plan re-reading, observation masking, decision probes"]
- garden.md — [brief description]
- create-plan.md — [brief description]
### Unchanged skills:
- create-pr.md
- create-tests.md
- deslop.md
- doc-split.md
- create-qa.md
### Project-owned files (will NOT be touched):
- harness.yaml
- AGENTS.md
- docs/*
- enforcement/*
- memory/*
Proceed with update? (Yes / Show diffs first / Cancel)
If the user asks to see diffs, show the diff for each modified file (use a compact format — old vs new section headers, not full file contents).
After user confirmation:
For each new and modified skill (excluding bootstrap-only and migrate-harness):
HARNESS_PATH/skills/<name>/SKILL.md to .claude/commands/<name>.mdproject-structure-validator goes to .claude/agents/project-structure-validator.mdFor each copied file, read it back and verify it is non-empty and matches the source.
Updated skills:
- [added] retrospective.md → .claude/commands/
- [updated] implement-feature.md → .claude/commands/
- [updated] garden.md → .claude/commands/
- [updated] create-plan.md → .claude/commands/
- [unchanged] 5 skills (skipped)
Read the current harness.yaml and HARNESS_PATH/harness.schema.yaml.
For each field defined in the schema under the docs section, check if it exists in the project's harness.yaml. If a field is missing, add it with its default value.
Rules:
Likely additions for projects installed before context engineering:
docs.memory (default: "memory/")docs.scratch (default: "scratch/")Present what will be added:
The following fields are missing from harness.yaml and will be added with defaults:
- docs.memory: "memory/"
- docs.scratch: "scratch/"
No existing values will be changed. Proceed? (Yes / Skip / Cancel)
If the user confirms, add the fields. If no fields are missing, report:
harness.yaml is up to date — no new fields needed.
If memory/ does not exist:
memory/ directory.gitkeep inside itRead .gitignore. If scratch/ is not listed:
scratch/ to .gitignore (add a blank line before it if the file doesn't end with one)If .gitignore does not exist, create one with just scratch/.
Read the project's AGENTS.md and HARNESS_PATH/references/agents-md-reference.md.
Check for differences that the user may want to adopt:
Check if these rows exist in the Quick Reference table:
memory/ rowIf missing, suggest adding them.
Check if AGENTS.md has a ## Context Management section. If not, suggest adding one.
Check if Agent Rules follow attention-favored placement (rule 1 should be about secrets, not "read before modifying"). If the old ordering is detected, suggest reordering.
Do NOT auto-edit AGENTS.md. Present all suggestions and let the user choose:
## Suggested AGENTS.md Updates
Your AGENTS.md could benefit from these updates:
1. Add "Agent memory" and "Context management" rows to Quick Reference table
2. Add a "Context Management" section (3-4 lines about memory/ and scratch/)
3. Reorder Agent Rules for attention-favored placement (critical rules at edges)
Should I apply these? (All / Pick which ones / Skip)
If the user approves, make the changes. If they skip, move on.
Stage all changed files and present a summary:
## Update Complete
### Changes made:
- [N] skills updated in .claude/commands/
- [N] new skills added to .claude/commands/
- [N] fields added to harness.yaml
- memory/ directory created
- scratch/ added to .gitignore
- AGENTS.md updated (if applicable)
### Not touched:
- docs/* (project-owned)
- enforcement/* (project-owned)
- memory/* contents (project-owned)
- .claude/hooks/* (project-specific)
Commit these changes?
If the user confirms, commit with message:
chore: update agent harness to latest version
- Updated [N] skills, added [N] new skills
- Added memory/ and scratch/ conventions
- [any other changes made]
Do NOT push. Tell the user:
Harness update committed locally. Run
git pushwhen ready.
documentation
Post-implementation retrospective that captures learnings to memory and proposes doc improvements
testing
Validate and fix project structure against architecture rules
data-ai
Install the agent harness into a target project. Detects project type (greenfield vs existing), copies skills, and delegates to the appropriate bootstrap command.
tools
Autonomous feature implementation orchestrator