feat(encyclopedia): consolidate duplicate articles, hierarchy, room articles #21

Merged
k.renner merged 5 commits from feat/encyclopedia-consolidate into main 2026-10-27 06:14:53 +00:00
Member

The first bootstrap plan (299 articles) split one subject over many peer articles (heating: heizungsanlage, waermepumpe, vitocal-heatpump, vitocal-heat-pump, three open3e/CAN articles, …) and had no room articles although room notes exist (eg-schlafzimmer-*).

Design: docs/superpowers/specs/2026-10-26-encyclopedia-consolidation-design.md.

  • Article vectors: each run embeds every article's titles + scope locally and searches them in memory; assign candidates now include the articles nearest to each note, not only those reached through neighbour notes.
  • Consolidate step (after assign): groups of 8 nearby articles, one call each (cap 60/run); the reply merges same-subject articles (redirects with fold's public/private semantics) and sets parents. Remembered per group fingerprint; repeats passes until nothing changes, within the cap.
  • Hierarchy: parent in the plan; write prompt links parent/children; the page shows main-article / sub-article navigation, visibility-filtered.
  • Rooms: category room; a note about something in a room also goes into the room's article.
  • Re-bootstrap: plan format bumped, the v2 plan reads as "no plan"; on a plan reset, article files without a planned article are deleted (production currently has none). Prompts.Version bumped.
  • Assign resolves redirected slugs to their live target instead of dropping the note.

Stacked on #20 (merge that first). Tests: Core 174, Contracts 85, Application 272, Host 164. Reviewed independently (Opus), two fix rounds; no open findings.

After deploy: one manual run (kubectl -n ai create job --from=cronjob/wiki-encyclopedia …) rebuilds the plan; then pick pilots.

🤖 Generated with Claude Code

The first bootstrap plan (299 articles) split one subject over many peer articles (heating: `heizungsanlage`, `waermepumpe`, `vitocal-heatpump`, `vitocal-heat-pump`, three open3e/CAN articles, …) and had no room articles although room notes exist (`eg-schlafzimmer-*`). Design: `docs/superpowers/specs/2026-10-26-encyclopedia-consolidation-design.md`. - **Article vectors:** each run embeds every article's titles + scope locally and searches them in memory; assign candidates now include the articles nearest to each note, not only those reached through neighbour notes. - **Consolidate step** (after assign): groups of 8 nearby articles, one call each (cap 60/run); the reply merges same-subject articles (redirects with fold's public/private semantics) and sets parents. Remembered per group fingerprint; repeats passes until nothing changes, within the cap. - **Hierarchy:** `parent` in the plan; write prompt links parent/children; the page shows main-article / sub-article navigation, visibility-filtered. - **Rooms:** category `room`; a note about something in a room also goes into the room's article. - **Re-bootstrap:** plan format bumped, the v2 plan reads as "no plan"; on a plan reset, article files without a planned article are deleted (production currently has none). `Prompts.Version` bumped. - Assign resolves redirected slugs to their live target instead of dropping the note. Stacked on #20 (merge that first). Tests: Core 174, Contracts 85, Application 272, Host 164. Reviewed independently (Opus), two fix rounds; no open findings. After deploy: one manual run (`kubectl -n ai create job --from=cronjob/wiki-encyclopedia …`) rebuilds the plan; then pick pilots. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-bot added 6 commits 2026-10-26 13:57:48 +00:00
fix(encyclopedia): room for thinking, merge duplicate new slugs, header timeouts retryable
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
e9ffad448f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Article vectors (titleDe | titleEn | scope, embedded locally, cosine in
memory) feed the assign candidates alongside the note-neighbour articles
and form the groups of a new consolidate step after assign: one bounded
call per group of up to 8 nearby articles, at most 60 per run, returning
merges (fold mechanics, redirects incl. public ones) and parent links
(no cycles anywhere in the plan). Groups are remembered by fingerprint
in _state.json.

PlannedArticle gains a parent; split children get the overview. The write
prompt marks main and sub-articles among its link targets (children
capped at 20); the article page shows the main article and the visible
sub-articles from the plan. Parent changes do not make articles stale.

The assign prompt also sends room notes to the room article; the write
prompt writes room articles from the room's angle.

The plan file gets version 3: the v2 plan reads as no plan, its state is
dropped, and the next run bootstraps. Prompts.Version 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Consolidation runs passes until one changes nothing; a changing reply ends
the pass and the next starts from the first seed, so the last pass's groups
are the ones the next run forms. Memory is pruned to that pass. A stable
neighbourhood after a merge is no longer asked again the next night.

Assign treats a redirected slug, proposed as new or referenced directly,
as its live target instead of dropping the note.

A plan reset deletes article files whose slug the new plan lacks.

The sub-articles heading has no id, so it cannot collide with a body
heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(encyclopedia): a failed consolidation call is not repeated in later passes
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
69a58988d6
The group stays unremembered and is asked again next run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k.renner merged commit ed6146f15e into main 2026-10-27 06:14:53 +00:00
k.renner deleted branch feat/encyclopedia-consolidate 2026-10-27 06:14:53 +00:00
Sign in to join this conversation.