diff --git a/.automate/.improve-state.tsv b/.automate/.improve-state.tsv index be9fca4..eef8d2b 100644 --- a/.automate/.improve-state.tsv +++ b/.automate/.improve-state.tsv @@ -62,3 +62,4 @@ c153d0 1771814424 c1f224 1771814562 c22a18 1771814641 c491ef 1771814737 +d23a9f 1771814812 diff --git a/.automate/continuous-improve.log b/.automate/continuous-improve.log index 4b02822..16d6a70 100644 --- a/.automate/continuous-improve.log +++ b/.automate/continuous-improve.log @@ -11251,3 +11251,13 @@ This is a solid enrichment. Let me now write the update_document call. [?25h status: UPDATED | Peace of Nicias | changes: removed duplicate title heading and answered review Q&A block; added negotiators (Nicias/Pleistoanax) with citation; expanded Terms with specific provisions (Amphipolis, prisoner count/details, temple access, Delphic autonomy); expanded Failure section with Quadruple Alliance details, Battle of Mantinea, and Sparta's failure to deliver Amphipolis; added temporal tags for 425 BCE, 420 BCE, 418 BCE; added footnote [^3] citing Thucydides 5.17 and Plutarch Life of Nicias 9 +[main e7d5941] improve: Peace of Nicias + 6 files changed, 176 insertions(+), 75 deletions(-) + rewrite treaties/peace-of-nicias.md (84%) +[2026-02-23 02:46:52] ✅ Committed: improve: Peace of Nicias +[2026-02-23 02:46:52] Done (67s) — UPDATED +[2026-02-23 02:46:57] [25/66] Next up... +[2026-02-23 02:46:57] ━━━ [Ur] (d882f6) reviews=0 garbage=0 ━━━ +[2026-02-23 02:46:57] 🧹 Bash cleanup applied +[2026-02-23 02:46:57] 🔍 Enrichment + review pass +[2026-02-23 02:47:34] ❌ kiro-cli error for Ur, continuing... diff --git a/.automate/continuous-improve.sh b/.automate/continuous-improve.sh index a304c7e..9b78351 100755 --- a/.automate/continuous-improve.sh +++ b/.automate/continuous-improve.sh @@ -154,12 +154,37 @@ bash_cleanup() { has_open=$(grep -c '^\- \[ \] `@q\[' "$file" 2>/dev/null) || true if [[ "$has_open" -eq 0 ]]; then sed -i '/^## Review Queue$/d; /^$/d' "$file" - # Clean up trailing blank lines and stray --- at end of file - sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}' "$file" changed=true fi fi + # Remove answered review Q&A lines (- [x] `@q[...]` and their > answer lines) + if grep -qP '^\- \[x\] `@q\[' "$file" 2>/dev/null; then + local has_open + has_open=$(grep -c '^\- \[ \] `@q\[' "$file" 2>/dev/null) || true + if [[ "$has_open" -eq 0 ]]; then + # Remove - [x] `@q[...] lines and the > answer line that follows each + awk ' + /^\- \[x\] `@q\[/ { skip=1; next } + skip && /^>/ { skip=0; next } + { skip=0; print } + ' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file" + changed=true + fi + fi + + # Remove duplicate H1 headings (keep first, remove subsequent) + local h1_count + h1_count=$(grep -c '^# ' "$file" 2>/dev/null) || true + if [[ "$h1_count" -gt 1 ]]; then + # Keep the first H1, delete all others + awk '/^# / { if (++count > 1) next } { print }' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file" + changed=true + fi + + # Clean up trailing blank lines + sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}' "$file" + [[ "$changed" == true ]] } @@ -335,6 +360,11 @@ RULES: - The document content is already provided above — do NOT call get_entity to re-read it unless you just called apply_review_answers and need to verify the result - Use update_document to edit — be surgical, change only what needs changing +- When calling update_document, do NOT include the comment or the + # Title heading in the content — factbase adds those automatically. Start content with + the first section (e.g. ## Overview). Including them causes duplicate headings. +- If the document has answered review questions (- [x] `@q[...] lines with > answer lines), + ALWAYS remove them from the content — they are stale artifacts, not part of the document. - Do NOT run git add, git commit, or git push — the wrapper script handles all git operations - If nothing needs changing, say so and move on @@ -390,7 +420,10 @@ process_entity() { # Phase 2: Decide if agent is needed local needs_agent=true - if [[ "${incomplete_name:-0}" -eq 1 ]]; then + if [[ "$SKIP_UNCHANGED" == true && "$last_processed" -gt 0 && "$mtime" -le "$last_processed" ]]; then + needs_agent=false + log " ⏭️ Not modified since last pass → skipping (--skip-unchanged)" + elif [[ "${incomplete_name:-0}" -eq 1 ]]; then log " 👤 Incomplete name (ruler doc) → agent needed to resolve identity" elif [[ "$review_count" -gt 0 ]]; then log " 📋 $review_count review questions → agent needed" diff --git a/.automate/improve-history.log b/.automate/improve-history.log index d9d19b4..f42a246 100644 --- a/.automate/improve-history.log +++ b/.automate/improve-history.log @@ -190,3 +190,6 @@ [2026-02-23T02:45:37+00:00] c491ef | Iron Smelting status: UPDATED | Iron Smelting | changes: Removed duplicate title heading; added citation refs to all Key Facts and Impact bullet points; enriched Development section with: (1) specificity on earliest meteoritic iron artifacts (4th millennium BCE Egypt), (2) Sub-Saharan Africa independent iron smelting (Nok culture, ~800–1000 BCE, Termit evidence, debated) with @t tag and Alpern 2005 citation, (3) South India wootz steel (~500–300 BCE, exported by 4th century BCE) with @t tag and Srinivasan & Ranganathan 2004 citation; added footnotes [^3] and [^4] duration: 85s +[2026-02-23T02:46:52+00:00] d23a9f | Peace of Nicias + status: UPDATED | Peace of Nicias | changes: removed duplicate title heading and answered review Q&A block; added negotiators (Nicias/Pleistoanax) with citation; expanded Terms with specific provisions (Amphipolis, prisoner count/details, temple access, Delphic autonomy); expanded Failure section with Quadruple Alliance details, Battle of Mantinea, and Sparta's failure to deliver Amphipolis; added temporal tags for 425 BCE, 420 BCE, 418 BCE; added footnote [^3] citing Thucydides 5.17 and Plutarch Life of Nicias 9 + duration: 67s diff --git a/cities/ur.md b/cities/ur.md index 5f1dc46..5c75787 100644 --- a/cities/ur.md +++ b/cities/ur.md @@ -27,9 +27,7 @@ Ur was one of the most important Sumerian city-states, located in southern Mesop [^2]: Woolley, L. *Excavations at Ur* (1954) --- -## Review Queue - - [x] `@q[temporal]` Line 10: "Location: Tell el-Muqayyar, Dhi Qar Province, Iraq" - when was this true? > Historical event. Attested by Woolley (1934) [^1]; Woolley (1954) [^2]. - [x] `@q[temporal]` Line 11: "Period: ~3800 BCE – ~500 BCE" - when was this true? diff --git a/logs/mcp-puppeteer-2026-02-23.log b/logs/mcp-puppeteer-2026-02-23.log index 875932c..81120cb 100644 --- a/logs/mcp-puppeteer-2026-02-23.log +++ b/logs/mcp-puppeteer-2026-02-23.log @@ -148,3 +148,6 @@ {"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2026-02-23 02:45:46.062"} {"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2026-02-23 02:45:46.067"} {"level":"info","message":"Puppeteer MCP Server closing","service":"mcp-puppeteer","timestamp":"2026-02-23 02:46:49.451"} +{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2026-02-23 02:47:00.098"} +{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2026-02-23 02:47:00.100"} +{"level":"info","message":"Puppeteer MCP Server closing","service":"mcp-puppeteer","timestamp":"2026-02-23 02:47:34.145"}