-
Notifications
You must be signed in to change notification settings - Fork 2
Troubleshooting
Common issues with ai-coding-ok, their symptoms, causes, and fixes.
| Symptom | Likely cause | Fix |
|---|---|---|
| AI doesn't read memory files | CLAUDE.md missing or PDCA mandate removed | Check CLAUDE.md, re-install |
| Act phase not updating memory | Stop hook not configured | Check .claude/settings.local.json
|
{{placeholders}} in files |
Installation incomplete | Re-run customize-prompt or install |
| Upgrade corrupted files | Merge conflict during upgrade | Revert and re-upgrade with review |
| Hook conflicts | settings.json and settings.local.json both have hooks | Merge into settings.local.json |
| CI memory check always fails | fetch-depth too shallow | Set fetch-depth: 0
|
| AI skips PDCA on Copilot | copilot-instructions.md missing | Re-run install |
| Memory files growing too large | No archival | Archive old task-history entries |
Symptom: verify.sh reports missing files.
Causes:
- Install script didn't complete
- Files were accidentally deleted
- Wrong target directory
Fix:
# Re-run the install
install ai-coding-ok
# Or manually:
bash install.sh --copilot --target /path/to/projectSymptom: {{project-name}} or {{语言}} still in files.
Causes:
- Customization step was skipped
- AI didn't complete placeholder replacement
Fix:
Claude Code:
install ai-coding-ok
# AI will detect existing files and offer to re-customize
Copilot:
Re-paste scripts/customize-prompt.md into Copilot Chat.
Symptom: Installer warns about hook conflicts.
Fix:
- Open both files
- Copy hooks from
settings.jsontosettings.local.json - Remove hooks from
settings.json - Only
settings.local.jsonshould have hooks
Symptom: AI starts coding immediately without reading .github/agent/memory/.
Checklist:
- Does
CLAUDE.mdexist and contain@AGENTS.md? - Does
AGENTS.mdhave the PDCA mandate block at the top? - Does
.github/agent/memory/directory exist? - Are the memory files populated (not empty)?
Fix:
# Quick fix: manually remind the AI
Read .github/agent/memory/project-memory.md and .github/agent/memory/task-history.md before proceeding.
# Permanent fix: re-install CLAUDE.md
# In Claude Code:
install ai-coding-ok
Symptom: No ## Memory Updates section in the response.
Causes:
- v3.0.0 or earlier (Act enforcement added in v3.0.1)
- Stop hook not configured (Claude Code)
- AI in long session, skipped Act
Fix:
Immediate:
Run the Act phase now: update task-history.md with this task's summary.
Permanent (Claude Code):
- Check
.claude/settings.local.jsonexists - Verify Stop hook is configured
- Upgrade to v3.1.0:
upgrade ai-coding-ok
Permanent (Copilot/Cursor): Upgrade to v3.0.1+ for mandatory Memory Updates section.
Symptom: AI reads memory for big features but skips for "fix a typo."
Fix: The Five-Layer Defense (v3.1.0) addresses this. Upgrade:
upgrade ai-coding-ok
Or manually remind:
Even for small changes, follow the PDCA workflow. Update task-history.md.
Symptom: upgrade ai-coding-ok detects no changes.
Causes:
- Version markers missing or corrupted
- Templates already match (unlikely if version is old)
Fix:
# Check version markers
head -1 AGENTS.md
head -1 .github/copilot-instructions.md
# If missing, manually add:
echo "<!-- ai-coding-ok: v2.0 -->" | cat - AGENTS.md > temp && mv temp AGENTS.mdThen retry: upgrade ai-coding-ok
Symptom: Upgrade detects a section you added as "should be removed."
Fix: During the interactive upgrade, choose "skip" for that section. The upgrade asks for confirmation before each change.
Symptom: After upgrade, some files have mixed content.
Fix:
# Revert the upgrade
git checkout HEAD~1 -- AGENTS.md CLAUDE.md .github/
# Re-run upgrade with careful review
upgrade ai-coding-ok
# Review each change individuallySymptom: Session won't end even after updating memory.
Causes:
-
task-history.mdsaved but not staged in git - Hook script has a bug
- Wrong
{{SOURCE_DIR_PATTERN}}
Fix:
# Check if task-history.md was actually modified
git diff .github/agent/memory/task-history.md
# If modified but not staged:
git add .github/agent/memory/task-history.md
# Check hook configuration
cat .claude/settings.local.jsonSymptom: Can't run git push or other legitimate operations.
Fix: Adjust the PreToolUse matcher in .claude/settings.local.json:
Or temporarily disable the hook by removing it from the array.
Symptom: Noticeable delay on tool use or session end.
Fix: Ensure hook scripts are lightweight:
- No network calls
- No heavy computation
-
git diffonly on specific files, not the whole repo
Symptom: CI reports "task-history.md was NOT updated" on every PR.
Causes:
-
fetch-depth: 0not set in checkout action - Wrong base ref comparison
- Task-history actually not updated
Fix:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # ← Required for git diff against baseSymptom: CI step fails with "verify.sh: No such file or directory."
Fix: Either commit verify.sh to your project:
cp /path/to/ai-coding-ok/scripts/verify.sh scripts/
git add scripts/verify.sh
git commit -m "chore: add verify.sh for CI"Or reference the full path to the ai-coding-ok repo in CI.
Symptom: File has 50+ entries, AI takes longer to read.
Fix:
# Archive entries beyond 30
tail -n +31 .github/agent/memory/task-history.md > docs/task-history-archive-$(date +%Y-Q%m).md
head -n 30 .github/agent/memory/task-history.md > temp && mv temp .github/agent/memory/task-history.mdSymptom: AI references outdated architecture or modules.
Fix:
- Review
project-memory.md - Remove or update stale sections
- Move deprecated architecture decisions to
decisions-log.mdwith "Deprecated" status - Add new modules and constraints
Symptom: Two ADRs with the same number or conflicting decisions.
Fix:
- Renumber the newer one to a new number
- If they conflict, mark the older one as "Superseded" with a reference to the newer one
- Add a note in the newer one: "Supersedes ADR-XXX"
Symptom: Copilot doesn't read memory files or update task-history.
Fix:
- Verify
.github/copilot-instructions.mdexists and has the PDCA enforcement block - Upgrade to v3.0.1+ (mandatory Memory Updates section)
- Manually remind: "Follow the instructions in .github/copilot-instructions.md"
Symptom: Cursor doesn't follow PDCA workflow.
Fix:
- Check
.cursor/rules/ai-coding-ok.mdcexists - Verify it has
alwaysApply: truein frontmatter - Restart Cursor to reload rules
- FAQ — more common questions
- GitHub Issues — report a bug or ask for help
- Five-Layer Defense — understand the defense system
- Hooks System — detailed hooks debugging
🧠 ai-coding-ok — AI 编程的 PDCA 记忆闭环。
GitHub · Issues · MIT License
{ "matcher": "Bash", "hooks": [{ "type": "command", "command": "bash -c '... less restrictive check ...'" }] }