-
Notifications
You must be signed in to change notification settings - Fork 2
Upgrade ai coding ok
How to upgrade the ai-coding-ok framework in your project to the latest version while preserving all your customizations.
In any project with ai-coding-ok installed, in Claude Code:
upgrade ai-coding-ok
Or in Chinese:
升级 ai-coding-ok
Claude will:
- Detect your installed version
- Compare against the latest templates
- Show you what will change
- Ask for confirmation
- Apply changes, preserving your project customizations
- Record the upgrade in task-history.md
Claude reads the version markers from your installed files:
AGENTS.md: <!-- ai-coding-ok: v2.2.0 -->
copilot-instructions.md: <!-- ai-coding-ok: v2.2.0 -->
system-prompt.md: <!-- ai-coding-ok: v2.2.0 -->
...
Reports: "Detected ai-coding-ok v2.2.0. Latest: v3.1.0."
Claude diffs your installed files against the latest templates, identifying three types of changes:
| Type | Example | Action |
|---|---|---|
| Added section | New "Five-Layer Defense" section in AGENTS.md | Insert into your file |
| Removed section | Old section no longer in template | Ask before deleting |
| Modified section | PDCA mandate updated from 3 to 7 steps | Smart merge |
Claude shows the change list and asks:
Upgrade v2.2.0 → v3.1.0
Changes:
✅ AGENTS.md — Plan phase expanded 3→7 steps
✅ AGENTS.md — Act phase added document sync step
✅ copilot-instructions.md — mandatory Memory Updates section
✅ system-prompt.md — Act phase annotated ⚠️ must not skip
✅ CLAUDE.md — STOP instruction added
✅ .claude/settings.local.json — hooks template added
✅ All files — version markers bumped to v3.1.0
Continue? (Y/n)
For each changed file, Claude:
- Reads your current file
- Applies only the framework changes
- Preserves your project-specific content (name, tech stack, architecture, custom ADRs)
- Updates the version marker
### [TASK-XXX] Upgrade ai-coding-ok v2.2.0 → v3.1.0
- **Date**: 2026-07-14
- **Type**: chore
- **Summary**: Upgraded framework. Sections added: Plan 7-step, Act doc sync, Memory Updates enforcement, CLAUDE.md STOP, hooks template. All project customizations preserved.
- **Files changed**: AGENTS.md, CLAUDE.md, copilot-instructions.md, system-prompt.md, settings.local.jsonIf you're on an older version, upgrades are applied in order:
| Current | Target | Main changes |
|---|---|---|
| v1.0 | v2.0 | AGENTS.md + copilot-instructions.md gain PDCA mandate; workflows.md Step 5 annotated; version markers added |
| v2.0 | v2.1.0 | Cursor support (.cursor/rules/ai-coding-ok.mdc); OpenCode support |
| v2.1.0 | v2.2.0 | CLAUDE.md auto-load shim; SKILL.md description rewrite |
| v2.2.0 | v3.0.0 | Plugin packaging; bilingual templates (en/zh); README split |
| v3.0.0 | v3.0.1 | Act phase enforcement in output format; mandatory Memory Updates section |
| v3.0.1 | v3.1.0 | Five-layer defense system; Claude Code hooks; install-time auto-config |
Each step is applied sequentially. You can upgrade across multiple versions in one command.
Claude explicitly preserves:
- Project identity: name, description, type
- Tech stack: language, framework, database, test framework
- Architecture: diagrams, module lists, data flow descriptions
- Custom constraints: your project-specific rules
- Custom ADRs: your decisions in decisions-log.md
- Task history: all entries in task-history.md
- Known issues: your entries in project-memory.md
- Custom workflows: any scenarios you added to workflows.md
- Coding standards: your language-specific conventions
For non-Claude Code users:
-
Pull the latest ai-coding-ok:
cd ~/tools/ai-coding-ok && git pull
-
Open
scripts/upgrade-prompt.md -
Copy the entire content and paste into Copilot Chat / Cursor Agent
-
The AI will detect your version, show changes, and apply them
bash scripts/verify.shhead -1 AGENTS.md
# Should show: <!-- ai-coding-ok: v3.1.0 -->git diffFocus on files that had sections added or modified. Confirm your project customizations are intact.
Make a small change and confirm the AI still:
- Reads memory files before coding
- Includes a
## Memory Updatessection in the response
If the upgrade causes issues:
# Revert to before the upgrade commit
git checkout HEAD~1 -- AGENTS.md CLAUDE.md .github/
# Re-run the upgrade with more caution
upgrade ai-coding-ok
# Review each change carefully before confirmingOr restore from git:
git diff HEAD~1 -- AGENTS.md .github/
# Review what changed
git checkout HEAD~1 -- AGENTS.md .github/Your version markers might be missing or corrupted. Check:
head -1 AGENTS.md
head -1 .github/copilot-instructions.mdIf markers are missing, manually add them (e.g., <!-- ai-coding-ok: v2.0 -->) and retry.
Choose "skip" for that section during confirmation. The upgrade is interactive — you can accept/reject individual changes.
The upgrade may have updated system-prompt.md or workflows.md in ways that affect behavior. Review the diff:
git diff HEAD~1 -- .github/agent/system-prompt.md .github/agent/workflows.mdAdjust the new content to match your preferences.
- Changelog — full version history
- Version Management — how versioning works
- Customization Guide — what's safe to customize after upgrade
🧠 ai-coding-ok — AI 编程的 PDCA 记忆闭环。
GitHub · Issues · MIT License