/keel:keel-upgrade [migrate | upgrade | switch]from KEEL
Migrates, upgrades, or switches a project to the KEEL 2.2.1 documentation standard. Handles inventory, currency, mapping, approval, migrate, and archive steps.
Ships in KEEL. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Bring an existing project up to KEEL version 2.2.1 (November 12, 2026), https://github.com/rickflashman/keel. Three cases:
references/files.md: the folder layout, the documentation files, and the tracker link.AGENTS.md is older than 2.2.1, or names AI-PROJECT-DOCS-STANDARD). Do steps 1, 8, and 9. references/changelog.md lists what changed in each version.KEEL.md in its root folder and the developer wants this skill to be the reference instead. Follow the Switch to the skill path in the Initialization rules below.If the developer gave instructions with the command, follow them: $ARGUMENTS
Whatever the case, change nothing until the developer approves the plan. Change only documentation, never code, configuration, or dependencies. The 2 exceptions are the docs check script and .gitignore (rule 7). Use the templates in templates/ (guidance: templates/README.md). When the work is complete, run references/checklist.md, report, and make the offers that the After the path rule names: the as-built review (keel-as-built) and the SPEC interview (keel-interview).
The rest of this file holds the initialization rules, the migration and upgrade steps, authority, the docs check, and the stronger checks question. The working rules (rule 1 to rule 11), the risk classes, and project skills are in references/rules.md. Read it only when a step or a template names a rule and you need its full text.
Check first: Before you create anything, check the project and choose 1 path:
AGENTS.md (or CLAUDE.md before 1.2.0) has a version stamp older than this skill's version. A stamp that names AI-PROJECT-DOCS-STANDARD is an older version of this standard (KEEL 1.x). Follow the upgrade-only path in Migrating or upgrading an existing project.README.md or rules file. A project with a stamp is never a Migration: it is an Upgrade, or it is up to date. A file outside the standard in such a project, such as a package README, is a candidate to absorb (see references/files.md). Follow Migrating or upgrading an existing project.templates/ (guidance: templates/README.md).KEEL.md is in the root folder, and the developer asked to switch. Run the Upgrade path first if the stamp is older than the skill's version. Then set the stamp to the skill's version and, only on the developer's explicit instruction, delete KEEL.md or move it where the developer says. Report what changed.If the root folder also holds AI-PROJECT-DOCS-STANDARD.md, it is an older version of this standard: follow this skill, and tell the developer. When the upgrade is complete, ask the developer once whether to delete the old file; do not delete, move, or archive it without that answer. Tell the developer which path you chose and why before you continue. If the stamp is this skill's version and there is nothing to bring in, say that the project is up to date, and stop.
Missing information: Before you create any file, ask the developer these 3 questions together, and wait for the answers. If the AI tool has an interactive question tool, use it: 1 question for each item, with free text for items 1 and 2, and the choices Yes and No for item 3. If it has no such tool, send this message as plain chat text. Skip only a question the developer already answered. Never take the project name from the folder name. If the developer does not answer an item, leave its placeholder.
Before I create the files, 3 questions:
1. Tracker and ticket ID, with the ticket link if you have one (or "none"):
2. Project name and a short description:
3. Does the project have a user interface (yes or no)?
Existing files: Never overwrite a file or folder from this standard that already exists. Merge the new content in, or propose the change, and ask the developer first.
After the path: When the path is complete, run the Initialization checklist and report. Then make these offers. Ask each offer as a direct question, with the interactive question tool if the AI tool has one, and wait for the answer. A line in the report is not an offer.
ARCHITECTURE.md has no Verified date.SPEC.md. When you also offer the as-built review, ask about the interview after the developer answers the first offer.As-built review: A review of existing code, offered after the path for a project with code (see After the path). The developer may decline or choose only some areas. On approval, run the keel-as-built skill, which holds the steps. If that skill is not installed, follow the As-built review steps in the Initialization rules of KEEL.md (https://github.com/rickflashman/keel).
SPEC interview: Interview the developer about the gaps in SPEC.md: edge cases, non-goals, trade-offs, constraints, glossary terms, and acceptance criteria. Ask a few questions at a time, and skip questions the docs already answer. Write the resulting SPEC changes as PROPOSED blocks for acceptance (rule 1). The developer may decline.
Use this section when the project already has documentation: another format, a single notes file, or an older version of this standard. The other Initialization rules (existing files, missing information) still apply. Whatever the prompt, change nothing until the developer approves the plan in step 5. Change only documentation, never code, configuration, or dependencies. The 2 exceptions are the docs check script and .gitignore (rule 7). For rules 10 and 11, a migration or an upgrade is 1 task with no risk class, because it changes no code: the approved plan is its ready card, the docs check is its test, and its report ends with the task summary, with "Class: n/a". It needs no work board row.
Upgrade only: If the project already follows an older version of this standard, do steps 1, 8, and 9. A version block for an older stamp can name other steps to run.
Back up. Confirm with the developer that a backup or version-control commit exists. If not, copy the existing documentation to a folder outside the project and tell the developer where it is. If you cannot write outside the project, say so, and continue only when the developer agrees.
Inventory. Scan the whole project, including subfolders, for .md, .txt, .rst, .adoc, and similar text files, plus .docx and .pdf files you can read. Include rules files (CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md, .github/instructions/), decision records, test plans, QA or release checklists, user manuals or help pages, runbooks, wiki exports, TODO lists, changelogs, and release notes. Skip docs/archive/ and dependency, build, and version-control folders (such as node_modules, vendor, dist, bin, obj, and .git). Do not read or migrate a developer's personal rules file outside the project, such as ~/.claude/CLAUDE.md. List any file you could not read and ask how to handle it.
Resolve currency. Group the inventory by topic. For each topic with two or more sources, find the current source. Use these signals, strongest first:
v2, final, or 2025-03).Do not rely on file modification dates alone; copies and sync tools (such as OneDrive or SharePoint) change them. Give each file one status: Current, Partly current (list the current sections), or Superseded (name what replaced it). If the signals disagree or are weak, mark the topic Unresolved.
Map. Give each Current item, and each current section of a Partly current file, a target file and section (for example, "requirements in README → docs/SPEC.md Goals"). Superseded content gets no target; it stays in the archive. Flag content with no target, content that conflicts with this standard, and content you would have to infer. When a newer source changed a choice recorded in a Superseded file, propose 2 decision notes from the original wording: the old choice ("Superseded by NNNN") and the new one (Accepted). For evidence of the change, such as failed tests, propose a docs/RESEARCH.md entry with the old finding marked "Outdated (date)".
Get approval. Show the developer the inventory, the currency table below, the mapping, the proposed decision notes and research entries, and the draft archive index (step 7). Ask about every Unresolved topic and every Low-confidence row; do not guess. Wait for approval.
| Topic | Sources | Current source | Evidence | Confidence |
|---|---|---|---|---|
| (Login method) | (auth.md, auth-v2.md, new-login.md) | (new-login.md) | (Matches the code; newest date) | (High / Medium / Low) |
Migrate, using the templates in templates/ (guidance: templates/README.md):
RELEASE-CHECKLIST.md with a matching check for each, carrying in existing test plans and release checklists.ARCHITECTURE.md area map from the existing code and tests, as its template says. If no command can run one area alone, write "(Full suite only)" and report it. Do not run the tests during the migration unless the developer asks. Write the docs check script and add its row.docs/USER-GUIDE.md, and their images in docs/images/. Offer to convert the guide to Simplified Technical English. Put runbooks and operations notes in the ARCHITECTURE.md Operations section, or docs/RUNBOOK.md if they pass a page.docs/decisions/ word for word, keeping their status (Accepted if none). Add the approved decision notes, using "(Not documented yet.)" for any part with no source, and number all notes together in date order. Link each approved research entry from its decision note.AGENTS.md. Put project-specific rules under Conventions, Claude-only rules under Claude-only notes in CLAUDE.md, and Copilot-only rules under Copilot-only notes in .github/copilot-instructions.md. Report conflicts with this standard or between files. Then replace CLAUDE.md and .github/copilot-instructions.md with their templates, keeping those notes.docs/HANDOFF.md as dated bullets, with the routing printed.docs/CHANGELOG.md, newest first.AGENTS.md version stamp to this skill's version.Archive. Move the originals into docs/archive/ under their original paths, so files with the same name do not collide (notes/auth.md becomes docs/archive/notes/auth.md). For files that keep their path, such as README.md and the rules files, save a copy there before editing. Create docs/archive/INDEX.md from its template, or add to it, with one row per archived file. Never delete the originals or the backup.
Upgrade. The version stamp is in AGENTS.md (in CLAUDE.md before 1.2.0). If it is older than this skill's version, bring the project's docs to the current templates. One rule covers every version after 2.1.2; this standard has no steps for each version.
references/upgrading-1.x.md for a stamp before 1.5.1, then references/upgrading-2.x.md. The blocks stop at 2.1.2. After them, continue as for a stamp of 2.1.2.AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, and each doc that the project uses and that has a starter template. Template text is the headings, the guidance in parentheses, the fixed lines at the top of a file (such as the top of the handoff file), the fixed lists (the Definition of ready, the Definition of done, and the Release steps), and any other line that a Templates changed line names. Project text is what the project wrote.
AGENTS.md is the exception, because the AI loads it in every session: replace every template section with its current version. Then apply the setup rule again (see templates/README.md): delete the optional parts that it names, and keep only the Docs entries for files that exist, plus the docs/RESEARCH.md entry. The project text is the project's own Conventions rules, the Ask before touching and Area owners lines, the Not used and Kept as is lines, the order of the Conventions rules, and the Skills list when the project has a skill. If the project has no skill, delete the Skills section. A default Conventions rule that the project changed or deleted stays as the project has it, and a guidance line that the project deleted stays deleted. Keep a Docs entry for a file that exists and is not a file from this standard, such as a package README. If the project uses another word for the developer, such as "owner", use it in the template lines. Other text in the old file can be old template text or a project line, and you cannot see the older templates. Show each such line in the plan (step 8.6) before you remove it, so the developer can keep it as a Conventions rule. If the new file is above a cap of rule 8, propose cuts in the plan; never cut a project rule without approval. Add a default rule only when a Changelog entry newer than the stamp introduces it.SPEC.md or DESIGN.md text: only their headings and guidance lines are template text. Never edit a decision note, an old CHANGELOG.md entry, or a file in docs/archive/.references/files.md). Add its row to the area map, or correct the row that is there. For a script that exists: a Changelog entry names the checks that its version changed on its Docs check line. Change those checks first. Then compare the header comment of the docs check script with the list in Docs check and drift report, and add, change, or remove checks to match. A check that the project added is not in that list: keep it, put its line after the 9 checks in the header comment, and name it in the report. Update the comment, and set the version in its first line.DESIGN.md (the file exists or it does not), and the stronger checks answer (rule 9) on the Testing line of ARCHITECTURE.md. Tell the developer, in 1 line each, what the newer Changelog entries add that the developer must ask for or decide: on-request reviews, optional rules, and optional template lines..gitignore (rule 7), and set the stamp to this skill's version, in the form of the AGENTS.md template. Run the docs check last, after the stamp is set and the Waiting bullets of step 9 are written.Report what moved where, what was inferred, which Superseded content was not migrated and what replaced it, what was left unmapped, and any conflicts. Also list, with file names, each superseded approach that the code still appears to use (possible dead code or an unfinished change). After an upgrade-only path, report instead each file that changed with its changes, each project difference that you kept (step 8), the questions and the offers, and the result of the docs check. On every path, add each question that is still open to the handoff file as a dated Waiting bullet (rule 5), and do not change its Last updated line. Run the Initialization checklist and mark any item that does not pass. Then continue with After the path (Initialization rules).
When KEEL.md is in the project root, it is the authoritative reference for project structure, documentation standards, naming conventions, required, recommended, and optional artifacts, and templates and seed content, including for documentation created later. Direct developer instructions and explicit project-specific requirements override it. When project docs disagree with each other, the Precedence list in AGENTS.md says which one wins.
AI assistants may read and use the file, but must not delete, rename, move, modify, archive, or otherwise manage it without direct, explicit developer instruction. The developer controls its location and lifecycle, and may ask an AI assistant to update it.
When KEEL.md is absent and the KEEL skill is installed, the skill is the reference for the same things. When both are present, KEEL.md wins; if their versions differ, tell the developer before you continue.
Docs check is a saved script in the project's own language, with no new runtime or dependency. When the project has no language yet, check which runtimes are installed on the developer's machine and use one of them; if none fits, write a shell script (sh on macOS and Linux, PowerShell on Windows). Port the script when the stack is chosen, and record that in ARCHITECTURE.md. It is the one script this standard asks for. It is listed in the area map as area Docs and runs with the targeted tests of every change; a red check is a failing test. The AI writes it at setup or upgrade and keeps the list of checks, with these definitions, in the script's header comment, so the list survives without this skill. The first line of that comment names the version that the list comes from, in the form Docs check for KEEL X.Y.Z, with this skill's version. It writes its results to test-results/docs.md, so the area test results in test-results/latest.md survive the same task.
These rules apply to every check:
test-results/docs.md starts with the first line of the header comment, the date, the result (PASS or FAIL), and the counts. Then it has 1 line for each check, and 1 line for each warning and each failure, with the file and the line number. A finding about a whole file gives line 1.README.md and every Markdown file in docs/. Checks 4, 6, and 7 do not read docs/archive/, because archived files are never edited.AGENTS.md: On the Not used line and the Kept as is line, the items come after the colon, with commas between them. A note in parentheses after an item is not part of its name, and "(none)" means no items.>, in SPEC.md or DESIGN.md. Its first line starts with > PROPOSED, then a date in the form YYYY-MM-DD. A block with no date is still a block (check 8).AGENTS.md does not exist, check 1 fails. If SPEC.md or RELEASE-CHECKLIST.md does not exist, check 3 fails. In every other check, a file that does not exist gives no finding, and without AGENTS.md its lines have no items.It checks:
AGENTS.md is within its caps (rule 8: a warning above 120 lines or 1,200 words, a failure above 140 lines or 1,500 words) and has the version stamp, Aligned to KEEL X.Y.Z. If it has no stamp, check 1 fails and the other checks run. The version in the stamp is the same as the version in the first line of the script's header comment. If they differ, the script reports only this failure, "The docs check is from KEEL X.Y.Z; update it to the version in AGENTS.md", because an older check list can give wrong findings.docs/HANDOFF.md and each docs/handoff/*.md is within its cap (rule 8: a warning above 40 lines, a failure above 50), and every bullet starts with a date; a bullet with no date is a failure. A bullet is a line that starts with - below a ## heading, and its date has the form (YYYY-MM-DD). No bullet is carried forward: compare each bullet, without its date, with the earlier versions of the same file. A bullet that was also in the previous version is carried once (a warning). A bullet that was also in the 2 previous versions is carried twice (a failure). A bullet below the Waiting heading that has the word PROPOSED is not counted (check 8 covers it). Compare only when the bullets differ from the last version the check saw, so repeated runs in one session do not count as carries. A version that changes only other lines, such as an upgrade of the lines at the top of the file, is not a version for this check. A version that only adds bullets and keeps the Last updated line is not a new version: its bullets belong to the version before it. An upgrade adds its Waiting bullets in that way. With version control (the project root has a .git folder, and the git command answers), read the earlier versions from the history. Without it, the check keeps its own snapshot in test-results/handoff-previous.md (on a team, test-results/handoff-previous-<developer>.md for each handoff file): the bullets of the last version it saw, each with its carry count. The check updates the snapshot only when the bullets changed, and the script chooses its format. The AI never edits the snapshot.AC-n in SPEC.md outside PROPOSED blocks has a row in the Requirement checks table of RELEASE-CHECKLIST.md, and every row has such an AC. A row is a table row whose first cell is an AC-n ID.#...) are not checked. In the rows of the area map in ARCHITECTURE.md, a path is a word that has a / and ends with / or with a file extension. A word is the text between spaces or table bars, without its quotes, backticks, brackets, bold and italic marks, and end punctuation. A file extension is a dot, then 1 to 5 letters or digits with at least 1 letter. A pattern (a word with <, >, *, {, or ...) is not a path. A path that starts with /, ~, or a drive letter (C:) is outside the project, and the check does not look for it. Look for the path from the project root, then from the folder of the doc that names it. The check does not read other path words in the docs: folder trees, build output, and history text name paths that correctly do not exist. The reviewer covers those. These missing paths are not failures: a file or folder from this standard that the project has not made yet (the exact name, such as docs/RESEARCH.md or docs/decisions/; a file inside such a folder is still checked), a path in test-results/, and an item on the Not used line. A command is the first code span in a cell of the Command column of the area map, or a line of a code block in ARCHITECTURE.md Commands. If the command names a path, that path exists; if it names none, its first word is a program on the PATH of the machine, or a file in the project. The check does not run a command.docs/ and its subfolders is a file from this standard (a name in the table of The documentation files, or a file inside docs/decisions/, docs/images/, docs/plans/, docs/handoff/, or docs/archive/), or is on the Kept as is line of AGENTS.md. A file from this standard needs no entry in the Docs list. Every other doc file (.md, .txt, .rst, .adoc, .docx, .pdf) in the project root is a file from this standard, KEEL.md or one of its UPGRADING files, a common repository file (LICENSE, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, with any extension), an older AI-PROJECT-DOCS-STANDARD.md, or on the Kept as is line. These .txt files are for tools, and are not doc files: requirements*.txt, constraints*.txt, robots.txt, llms.txt, and CMakeLists.txt. A file that fails is a candidate to absorb (see references/files.md). The check does not scan subfolders such as package READMEs; the AI finds those while it works.> Name: text. Decision notes and the files on the Kept as is line are not checked.docs/ has the name of a file from this standard plus a suffix: the name without its extension, then -, _, a space, or (, then more text, in upper or lower case. Examples: SPEC-v2.md, PLAN_old.md, and ARCHITECTURE copy.md. A name that is a file from this standard, such as DESIGN-GUIDE.html, is not a failure.docs/archive/, or in AGENTS.md, CLAUDE.md, and .github/copilot-instructions.md: the word password, secret, api_key, or token, in upper or lower case, then = or :, then a value of 8 or more characters with no space, on the same line; or a private key header (-----BEGIN ... PRIVATE KEY-----). The word can be part of a longer name, such as DB_PASSWORD, and spaces and quotes around the = or : are allowed. A placeholder in angle brackets or in parentheses is not a value.Drift report is a read-only report the AI writes before every release (rule 6) and whenever the developer asks ("run a drift report"). It never blocks and changes nothing. Each finding carries a certainty, and findings are never averaged. Certain: a mechanical check proves it. Evidence: the AI found it by reading, and the developer confirms it. Inference: a guess from dates, not from behavior.
| Finding | Certainty | How found |
|---|---|---|
| A SPEC feature or AC with no code behind it | Evidence | Area map ACs column against the code |
| Code with no SPEC coverage | Evidence | Folders not in any area map row, or rows with no ACs |
| An AC with no test, or a test with no AC | Certain | Area map ACs column against tests that cite AC-n in a name or comment |
| A command, folder, file, or link in the docs that does not exist | Certain | The docs check (paths, links, commands); the reviewer for anything else |
| A doc section older than the code it describes | Inference | The Verified date against the change history: version-control history if any; else the work board Started dates and CHANGELOG.md; else "Not run: no change history". Compares dates, not behavior. |
The report goes in the task summary. Lasting findings go to RESEARCH.md. At a release, each finding is fixed or accepted by the developer.
Stronger checks (optional): for a Shared change or a release, the fresh-context reviewer may also test "what if" cases at the edges of the changed logic. Where the project has a mutation testing tool, it may run it on the changed code, to confirm that the new tests have real assertions. The developer decides whether the project uses these checks. Ask once, when you first fill the ARCHITECTURE.md Testing section (at setup or upgrade), and record the answer on its Stronger checks line. Show all 3 options, each with its description, and wait for the developer's choice. Do not choose an option for the developer, and do not ask the developer only to confirm 1 option. If the AI tool has an interactive question tool, use it, with 1 choice for each option. If it has no such tool, send this message as plain chat text:
Optional stronger checks, for Shared changes and releases only:
1. Not used (most common): the normal tests only.
2. What-if cases (recommended): the reviewer also tests the edges
of the changed logic, such as limits, empty values, and times
that cross midnight. No tool to install; a little more review time.
3. What-if cases and mutation testing (rare): a tool (such as Stryker for
JavaScript or mutmut for Python) changes the code on purpose to
prove that the tests catch it. Needs the tool; much slower.
Which one (1, 2, or 3)? You can change it later.
If the developer tells you to continue without a choice, record option 2 and say so in the task summary.
This skill is generated from KEEL.md in https://github.com/rickflashman/keel. Do not edit it by hand; change KEEL.md and run python3 build/build.py.
references/changelog.md (opens in a new tab)references/checklist.md (opens in a new tab)references/files.md (opens in a new tab)references/reviews.md (opens in a new tab)references/rules.md (opens in a new tab)references/upgrading-1.x.md (opens in a new tab)references/upgrading-2.x.md (opens in a new tab)templates/AGENTS.template.md (opens in a new tab)templates/CLAUDE.template.md (opens in a new tab)templates/README.md (opens in a new tab)templates/README.template.md (opens in a new tab)templates/docs/ARCHITECTURE.template.md (opens in a new tab)templates/docs/CHANGELOG.template.md (opens in a new tab)templates/docs/DESIGN.template.md (opens in a new tab)templates/docs/HANDOFF.template.md (opens in a new tab)templates/docs/MOCKUP.template.md (opens in a new tab)templates/docs/PLAN.template.md (opens in a new tab)templates/docs/RELEASE-CHECKLIST.template.md (opens in a new tab)templates/docs/RESEARCH.template.md (opens in a new tab)templates/docs/RUNBOOK.template.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
keel, documentation-standard, project-docs, migration, upgrade
6 skills in this plugin
/keelKEEL 2.2.1, the documentation and working standard for AI-developed projects. Sets up, migrates, or upgrades a project's docs (README, SPEC, ARCHITECTURE, PLAN, RELEASE-CHECKLIST, AGENTS.md) and chooses the right path on its own. Use when the developer runs the keel skill (/keel:keel or /keel), says 'apply KEEL', 'set up KEEL', or 'upgrade to the latest KEEL', or is not sure which KEEL task they need. Task skills: keel-init, keel-upgrade, keel-check, keel-as-built, keel-interview./keel-as-builtKEEL 2.2.1 as-built review of existing code: feature inventory, area map in ARCHITECTURE.md, SPEC acceptance criteria inferred from the code as PROPOSED blocks, and a differences and health report (built but not specified, specified but not built, no tests, secrets, risky dependencies). Changes no code. Use in a KEEL project when the developer runs keel-as-built (/keel:keel-as-built or /keel-as-built) or asks for an as-built review, to document existing code, or to set the Verified dates./keel-checknpx claudepluginhub rickflashman/keel --plugin keelOther plugins' skills for the same job