Defense · Migration Logic

Migration Rules.

How Defense classifies an unknown file from a founder's existing folder and routes it into the correct department.

Source of truth. The /06-migrate skill loads this file before classifying anything. Updates here change classification behavior on the next migration run.

The decision flow

  1. Is the file part of the AIOS template? Compare against 06-defense-and-kaizen/aios-manifest.json. If yes, the AIOS version wins. The source version goes to z.archives/migrated/originals/.
  2. Is the file recognizable client work? Apply the rules table below in order, top-to-bottom. First match wins.
  3. Cannot classify? Goes to z.unsorted/ with a note for the founder to review.

Classification rules (first match wins)

If filename / folder contains...Route to
strategy, swot, competitive, positioning, market-analysis01-strategy/projects/migrated/
product, roadmap, feature, mvp, prd, spec02-product/projects/migrated/
marketing, campaign, post, content, linkedin, newsletter, blog, copy, ad, brand, seo03-marketing/projects/migrated/
sales, pipeline, lead, proposal, quote, deal, client-call, discovery, follow-up04-sales/projects/migrated/
operations, sop, process, workflow, delivery, project-management, vendor05-operations/projects/migrated/
tech, ai, code, prompt, agent, automation, integration, api, dev06-technology-and-ai/projects/migrated/
finance, invoice, expense, p&l, profit, cash, budget, tax, accounting07-finance/projects/migrated/
hr, hire, hiring, team, roster, performance, review, culture, onboarding08-hr-admin/projects/migrated/
legal, contract, nda, agreement, terms, privacy, trademark, license, compliance09-legal/projects/migrated/
defense, audit, maintenance, kaizen, log, decision, retrospective10-defense-and-kaizen/projects/migrated/
founder, me, personal, journal, brain-dump, thinking00-chief-of-staff/projects/migrated/
transcript, meeting, call-recording, fathom, zoom-recording10-defense-and-kaizen/projects/migrated/transcripts/

Folder-name overrides

If a source file is inside a folder whose name matches one of the rules above, prefer the folder match over the filename match. A file named notes.md inside marketing/ goes to 03-marketing/projects/migrated/marketing/notes.md, preserving the original folder.

Special cases

The CLAUDE.md collision

If the source folder has its own CLAUDE.md, the AIOS version wins. The source version goes to z.archives/migrated/originals/CLAUDE-original.md. Defense flags this for the founder so they can transfer any unique instructions into the new file manually.

Hidden files and system junk

Skip entirely (do not migrate, do not archive):

Existing .claude/ folder

If the source folder has a .claude/agents/ or .claude/skills/, merge contents in:

The "I have no idea" case

If a file matches no rule above and the filename gives no signal (e.g., untitled.md, doc1.docx, screenshot.png), route to z.unsorted/. Defense surfaces these in the migration plan with a note: "Cannot classify -- needs your eyes."

What Defense never does

Updating these rules

Defense updates this file when a real migration surfaces a pattern that should be added. New rules go to the bottom of the rules table unless they need to override an existing rule, in which case they go above the rule they override.