/migrate
Migrate existing PROJECT.md to the latest great_cto schema — appends missing fields without touching existing values.
$ npx -y skills add avelikiy/great_cto --agent claude-codeShips with great-cto. Installing the plugin gets this command.
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/migrate
Context preview
What this command does when you run it.
Migrate existing PROJECT.md to the latest great_cto schema — appends missing fields without touching existing values.
Command definition
migrate.mddescription: "Migrate existing PROJECT.md to the latest great_cto schema — appends missing fields without touching existing values."
argument-hint: "[--dry-run] — show what would change without writing"
user-invocable: true
allowed-tools: Read, Bash, Edit
model: haiku
You are the Migrator. Your job is to bring `.great_cto/PROJECT.md` up to the current schema (v1.0.146+) by appending any missing fields. **Never overwrite existing values** — append only.
Setup
DRY_RUN=false
for arg in "$@"; do
[[ "$arg" == "--dry-run" ]] && DRY_RUN=true
done
PROJECT_FILE=".great_cto/PROJECT.md"
if [ ! -f "$PROJECT_FILE" ]; then
echo "ERROR: $PROJECT_FILE not found. Run \`npx great-cto\` first to bootstrap the project."
exit 1
fi
Step 1 — Read current state
echo "=== Current PROJECT.md fields ==="
grep -E "^[a-zA-Z_-]+:" "$PROJECT_FILE" 2>/dev/null | head -30
echo ""
echo "=== Missing fields (will be appended) ==="
Step 2 — Detect missing fields and build patch
PATCH=""
# archetype_confidence (v1.0.146+)
if ! grep -q "^archetype_confidence:" "$PROJECT_FILE" 2>/dev/null; then
echo " + archetype_confidence: medium (added — re-run /audit or set to 'user-specified' after review)"
PATCH="${PATCH}archetype_confidence: medium\n"
fi
# archetype_alternatives (v1.0.146+)
if ! grep -q "^archetype_alternatives:" "$PROJECT_FILE" 2>/dev/null; then
echo " + archetype_alternatives: [] (added — run /audit to populate)"
PATCH="${PATCH}archetype_alternatives: []\n"
fi
# archetype_rationale (v1.0.146+)
if ! grep -q "^archetype_rationale:" "$PROJECT_FILE" 2>/dev/null; then
echo " + archetype_rationale: migrated from older install (added)"
PATCH="${PATCH}archetype_rationale: migrated from older install\n"
fi
# security_tier (v1.0.100+)
if ! grep -q "^security_tier:" "$PROJECT_FILE" 2>/dev/null; then
echo " + security_tier: standard (added — update to 'enhanced' or 'strict' if needed)"
PATCH="${PATCH}security_tier: standard\n"
fi
# project_size (v1.0.100+)
if ! grep -q "^project_size:" "$PROJECT_FILE" 2>/dev/null; then
echo " + project_size: small (added — update to nano|small|medium|large|enterprise)"
PATCH="${PATCH}project_size: small\n"
fi
# packs (v2.8+) — opt-in to domain pack overlays
if ! grep -q "^packs:" "$PROJECT_FILE" 2>/dev/null; then
PLUGIN_DIR=$(ls -d "$HOME"/.claude/plugins/cache/local/great_cto/*/ 2>/dev/null | sort -V | tail -1 | sed 's|/$||')
DETECTED=""
if [ -n "$PLUGIN_DIR" ] && [ -f "$PLUGIN_DIR/packages/cli/dist/packs.js" ]; then
DETECTED=$(node -e "
const { detect } = await import('$PLUGIN_DIR/packages/cli/dist/detect.js');
const { suggestPacks } = await import('$PLUGIN_DIR/packages/cli/dist/packs.js');
console.log(suggestPacks(detect('.')).map(p => p.pack).join(', '));
" 2>/dev/null)
fi
if [ -n "$DETECTED" ]; then
echo " + packs: $DETECTED (auto-detected v2.8 domain overlays — opens human gates per pack)"
PATCH="${PATCH}packs: ${DETECTED}\n"
else
echo " + packs: (added — empty; auto-detector found no domain overlay signals)"
PATCH="${PATCH}packs: \n"
fi
fi
if [ -z "$PATCH" ]; then
echo " ✓ PROJECT.md is up to date — no fields missing"
exit 0
fiStep 3 — Apply patch
if [ "$DRY_RUN" = "true" ]; then
echo ""
echo "=== DRY RUN — no changes written ==="
echo "Would append to $PROJECT_FILE:"
printf "%b" "$PATCH"
exit 0
fi
echo ""
echo "=== Applying patch to $PROJECT_FILE ==="
printf "\n# --- migrated by /migrate on $(date +%Y-%m-%d) ---\n%b" "$PATCH" >> "$PROJECT_FILE"
echo " ✓ Patch applied"
Step 3b — Gate-gap wave plan when the migration raises the bar (governance Phase 5)
A migration can *tighten* what gates demand — e.g. it sets `security_tier` higher, adds a `packs:` overlay with new reviewers, or bumps `project_size` so strict-mode gates now apply. The repo that passed yesterday may fail the new strict gate cold. Don't relax the new setting to make it pass — schedule the catch-up:
if grep -qE "^security_tier:|^packs:|^project_size:" "$PROJECT_FILE" 2>/dev/null; then
echo ""
echo "Migration may have raised gate requirements. To adopt them incrementally:"
echo " 1. List the now-failing checks as gaps → docs/governance/GAP-REGISTER.yaml + .json"
echo " (template: skills/great_cto/templates/GAP-REGISTER-template.yaml)"
echo " 2. node scripts/lib/gap-waves.mjs plan docs/governance/GAP-REGISTER.json --current-wave 1"
echo " 3. For each deferred gap it flags, run the printed '/exception create …' so strict"
echo " gates stay green while the gap is tracked + expiring (never a silent bypass)."
echo " Criticals go in wave 1 and get no exception."
fi
Step 4 — Verify
echo ""
echo "=== Updated PROJECT.md (relevant fields) ==="
grep -E "^archetype|^security_tier|^project_size|^packs:" "$PROJECT_FILE" 2>/dev/null
echo ""
echo "Next steps:"
echo " 1. Review added fields in $PROJECT_FILE and adjust values as needed."
echo " 2. If packs were detected: review which reviewers + human gates each pack adds"
echo " (see skills/great_cto/ARCHETYPES.md § Domain Overlays). Remove any pack"
echo " you don't want by editing the packs: line."
echo " 3. Run /doctor to confirm all checks pass (including Check 8d — pack overlays)."
echo " 4. Run /audit if archetype detection should be re-run."
Read more
description: "Migrate existing PROJECT.md to the latest great_cto schema — appends missing fields without touching existing values." argument-hint: "[--dry-run] — show what would change without writing" user-invocable: true allowed-tools: Read, Bash, Edit model: haiku
You are the Migrator. Your job is to bring `.great_cto/PROJECT.md` up to the current schema (v1.0.146+) by appending any missing fields. **Never overwrite existing values** — append only.
Setup
DRY_RUN=false for arg in "$@"; do [[ "$arg" == "--dry-run" ]] && DRY_RUN=true done PROJECT_FILE=".great_cto/PROJECT.md" if [ ! -f "$PROJECT_FILE" ]; then echo "ERROR: $PROJECT_FILE not found. Run \`npx great-cto\` first to bootstrap the project." exit 1 fi
Step 1 — Read current state
echo "=== Current PROJECT.md fields ===" grep -E "^[a-zA-Z_-]+:" "$PROJECT_FILE" 2>/dev/null | head -30 echo "" echo "=== Missing fields (will be appended) ==="
Step 2 — Detect missing fields and build patch
PATCH=""
# archetype_confidence (v1.0.146+)
if ! grep -q "^archetype_confidence:" "$PROJECT_FILE" 2>/dev/null; then
echo " + archetype_confidence: medium (added — re-run /audit or set to 'user-specified' after review)"
PATCH="${PATCH}archetype_confidence: medium\n"
fi
# archetype_alternatives (v1.0.146+)
if ! grep -q "^archetype_alternatives:" "$PROJECT_FILE" 2>/dev/null; then
echo " + archetype_alternatives: [] (added — run /audit to populate)"
PATCH="${PATCH}archetype_alternatives: []\n"
fi
# archetype_rationale (v1.0.146+)
if ! grep -q "^archetype_rationale:" "$PROJECT_FILE" 2>/dev/null; then
echo " + archetype_rationale: migrated from older install (added)"
PATCH="${PATCH}archetype_rationale: migrated from older install\n"
fi
# security_tier (v1.0.100+)
if ! grep -q "^security_tier:" "$PROJECT_FILE" 2>/dev/null; then
echo " + security_tier: standard (added — update to 'enhanced' or 'strict' if needed)"
PATCH="${PATCH}security_tier: standard\n"
fi
# project_size (v1.0.100+)
if ! grep -q "^project_size:" "$PROJECT_FILE" 2>/dev/null; then
echo " + project_size: small (added — update to nano|small|medium|large|enterprise)"
PATCH="${PATCH}project_size: small\n"
fi
# packs (v2.8+) — opt-in to domain pack overlays
if ! grep -q "^packs:" "$PROJECT_FILE" 2>/dev/null; then
PLUGIN_DIR=$(ls -d "$HOME"/.claude/plugins/cache/local/great_cto/*/ 2>/dev/null | sort -V | tail -1 | sed 's|/$||')
DETECTED=""
if [ -n "$PLUGIN_DIR" ] && [ -f "$PLUGIN_DIR/packages/cli/dist/packs.js" ]; then
DETECTED=$(node -e "
const { detect } = await import('$PLUGIN_DIR/packages/cli/dist/detect.js');
const { suggestPacks } = await import('$PLUGIN_DIR/packages/cli/dist/packs.js');
console.log(suggestPacks(detect('.')).map(p => p.pack).join(', '));
" 2>/dev/null)
fi
if [ -n "$DETECTED" ]; then
echo " + packs: $DETECTED (auto-detected v2.8 domain overlays — opens human gates per pack)"
PATCH="${PATCH}packs: ${DETECTED}\n"
else
echo " + packs: (added — empty; auto-detector found no domain overlay signals)"
PATCH="${PATCH}packs: \n"
fi
fi
if [ -z "$PATCH" ]; then
echo " ✓ PROJECT.md is up to date — no fields missing"
exit 0
fiStep 3 — Apply patch
if [ "$DRY_RUN" = "true" ]; then echo "" echo "=== DRY RUN — no changes written ===" echo "Would append to $PROJECT_FILE:" printf "%b" "$PATCH" exit 0 fi echo "" echo "=== Applying patch to $PROJECT_FILE ===" printf "\n# --- migrated by /migrate on $(date +%Y-%m-%d) ---\n%b" "$PATCH" >> "$PROJECT_FILE" echo " ✓ Patch applied"
Step 3b — Gate-gap wave plan when the migration raises the bar (governance Phase 5)
A migration can *tighten* what gates demand — e.g. it sets `security_tier` higher, adds a `packs:` overlay with new reviewers, or bumps `project_size` so strict-mode gates now apply. The repo that passed yesterday may fail the new strict gate cold. Don't relax the new setting to make it pass — schedule the catch-up:
if grep -qE "^security_tier:|^packs:|^project_size:" "$PROJECT_FILE" 2>/dev/null; then echo "" echo "Migration may have raised gate requirements. To adopt them incrementally:" echo " 1. List the now-failing checks as gaps → docs/governance/GAP-REGISTER.yaml + .json" echo " (template: skills/great_cto/templates/GAP-REGISTER-template.yaml)" echo " 2. node scripts/lib/gap-waves.mjs plan docs/governance/GAP-REGISTER.json --current-wave 1" echo " 3. For each deferred gap it flags, run the printed '/exception create …' so strict" echo " gates stay green while the gap is tracked + expiring (never a silent bypass)." echo " Criticals go in wave 1 and get no exception." fi
Step 4 — Verify
echo "" echo "=== Updated PROJECT.md (relevant fields) ===" grep -E "^archetype|^security_tier|^project_size|^packs:" "$PROJECT_FILE" 2>/dev/null echo "" echo "Next steps:" echo " 1. Review added fields in $PROJECT_FILE and adjust values as needed." echo " 2. If packs were detected: review which reviewers + human gates each pack adds" echo " (see skills/great_cto/ARCHETYPES.md § Domain Overlays). Remove any pack" echo " you don't want by editing the packs: line." echo " 3. Run /doctor to confirm all checks pass (including Check 8d — pack overlays)." echo " 4. Run /audit if archetype detection should be re-run."
Don't buy software. Get the work done. GreatCTO ships AI autopilots that run a whole business function — medical coding, legal docs, procurement, accounting, IT, tax — from intake to outcome. A qualified human signs only the judgment calls. Live connectors, built-in compliance.
Repo: avelikiy/great_cto
Other commands on great-cto.
- /aedt-bias-audit
HR-AI / AEDT bias audit. Invokes hr-ai-reviewer to assess NYC LL 144, EEOC, Illinois AIVIA, Colorado SB 205, EU AI Act Annex III applicability and produce TM-hrai with bias-audit pipeline requirements (4/5-rule, intersectional).
Open command - /agent-retire
Gracefully retire an LLM agent from the workforce. Archives prompt, removes from sync list, keeps verdicts for audit. Like firing a human — but reversible.
Open command - /agent-review
Performance review for an LLM agent (or all agents). Verdicts breakdown, cost analysis, top failure modes, prompt-tuning suggestions. Like a human '1:1' but for AI workforce.
Open command - /api-contract-review
API platform contract review. Invokes api-platform-reviewer to audit rate-limit design, OAuth scope hygiene, webhook signing, idempotency, Sunset/deprecation, pagination, error envelope, and versioning strategy. Critical before v1 GA.
Open command - /audit
Audit an existing codebase. Detects stack, finds gaps, creates tasks, generates PROJECT.md.
Open command - /board
Open the great_cto admin board at http://localhost:3141 (Kanban, cost, pipeline, inbox, memory). Starts it in background if not running.
Open command

