Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
TypeScript antigravity-skillsbusiness-knowledgeclaude-codeclaude-skillscodebase-analysiscodexcodex-skillsdeveloper-tools-ai-agentgemini-cli-skillskarpathy-llm-wikiknowledge-baseknowledge-graphmemoryopencode-skillspi-agentunderstandcodevibe-coding
fix(lessons): make Phase 7 publication a no-op after the incremental save gate (#753)
06FallingLight90561c9e49ffb4
diff --git a/understand-anything-plugin/skills/understand/SKILL.md b/understand-anything-plugin/skills/understand/SKILL.mdindex a9dcbe40..4636f348 100644--- a/understand-anything-plugin/skills/understand/SKILL.md+++ b/understand-anything-plugin/skills/understand/SKILL.md@@ -687,7 +687,7 @@ This helper validates/deduplicates nodes and edges, reconciles layers/tour, and- `PARTIAL_UPDATE` never attempts lessons (it keeps the existing file untouched — see the Code Lessons section above), so with no staged document the served sidecar stays as-is.- Without `--review`, report the incremental summary and **STOP**. Do not run Phase 6 or the full-save Phase 7; this is what prevents the ordinary local update from paying for whole-graph review.-- With `--review`, copy the newly saved `$UA_DIR/knowledge-graph.json` to `$UA_DIR/intermediate/assembled-graph.json`, then continue to the full graph-reviewer path in Phase 6. Do not run the inline default reviewer.+- With `--review`, copy the newly saved `$UA_DIR/knowledge-graph.json` to `$UA_DIR/intermediate/assembled-graph.json`, then continue to the full graph-reviewer path in Phase 6. Do not run the inline default reviewer. Lessons were already published by the save gate above (or handled per its rules), so Phase 7's lesson publication is a **no-op** on this path.---@@ -861,7 +861,7 @@ Report to the user: `[Phase 7/7] Saving knowledge graph...`1. Write the final knowledge graph to `$UA_DIR/knowledge-graph.json`.- Then publish lessons under the same rules as **Lesson publication** in the incremental save gate — only when this run executed the Code Lessons step: if this run staged `$UA_DIR/intermediate/code-lessons.normalized.json`, atomically move it over `$UA_DIR/code-lessons.json`; if lessons were attempted but skipped or failed, delete a served `$UA_DIR/code-lessons.json` instead so no stale sidecar survives beside the new graph and tour. On runs that skipped Phase 5 (e.g. `--review` reruns on the same commit), leave `$UA_DIR/code-lessons.json` untouched — an abandoned staged document from an earlier interrupted run must not be published.+ Then publish lessons under the same rules as **Lesson publication** in the incremental save gate — only when this run executed the Code Lessons step: if this run staged `$UA_DIR/intermediate/code-lessons.normalized.json`, atomically move it over `$UA_DIR/code-lessons.json`; if lessons were attempted but skipped or failed, delete a served `$UA_DIR/code-lessons.json` instead so no stale sidecar survives beside the new graph and tour. On runs that skipped Phase 5 (e.g. `--review` reruns on the same commit), leave `$UA_DIR/code-lessons.json` untouched — an abandoned staged document from an earlier interrupted run must not be published. **Exception — incremental `--review` runs:** when the incremental save gate already published this run's lessons (the staged document was moved at the gate), this step is a no-op: do not move anything, and do not treat the now-missing staged document as a failed attempt and delete the freshly published `$UA_DIR/code-lessons.json`.2. **Generate structural fingerprints baseline.** This creates the basis for future automatic incremental updates and **must succeed before `meta.json` is written** — otherwise auto-update sees a fresh commit hash with no fingerprints to compare against, classifies every file as STRUCTURAL, and escalates to `FULL_UPDATE` on every subsequent commit (issue #152).