Migrate a profile to the nonfiction schema
Profiles made before version 2.7 use the old layout (## Brief, ## Rules, ## Never). vf.py validate reports them with a hint to migrate. They still work for writing in the meantime: read their rules as written.
Migration never overwrites anything. The user approves every new field.
Steps
- Write the new file. Run
python3 <skill>/scripts/vf.py migrate --profile <name>(and--baseforbase.md). It writesrules.migrated.mdnext torules.md, which stays unchanged. It keeps every rule's ID, wording and evidence, the brief, the notes, and any other text (moved to Notes). It prints what is left to do. - Agree the missing fields with the user. Old rules had no strength, kind, scope, exceptions or check. For each rule, draft them and show the whole block. Ask yes, no or reword, a few rules at a time. Do not change the instruction's wording unless the user asks.
- Old categories that covered two sections (
openings,closings,structure,punctuation) were placed in the likelier one. Ask the user if the report says so. - A rule with no approval date gets the date the user first approved it, if they know it, or today's date with their yes.
- Section 1 needs
Genre and document typesandScope. Ask for them in one message.
- Old categories that covered two sections (
- Validate. Run
vf.py validate --file <profile>/rules.migrated.mduntil it shows no errors. - Replace. Copy the content of
rules.migrated.mdintorules.md, deleterules.migrated.md, runvf.py validate --profile <name>andvf.py save -m "migrate <name> to schema nf-1". Git keeps the old version.
Lessons do not need migration: vf.py reads old lesson categories and maps them. Update a lesson's category when you next touch it.
Profile type
vf.py migrate marks the profile type: nonfiction by default. If the profile is for fiction, or its purpose is unclear, ask the user first and pass --type fiction or --type unclassified.