Skip to content

Multi-author timeline merge (pensar merge) #52

@TroyHernandez

Description

@TroyHernandez

Problem

pensar assumes a single authoritative vault (the conventions still say "local-only repo on one authoritative machine; team members clone read-only"). The cornball-ai company vault (cornelius) is now genuinely two authors (both founders commit to cornball-ai/cornelius). Under plain git, every vault divergence becomes a conflict — and almost none are real content disagreements.

Worked example (2026-05-27 cornelius merge)

A 6/6 divergence produced 10 git conflicts. Resolved by hand, they sorted into four mechanical classes + one human class:

Class Files Correct resolution
Append-only log collision log.md chronological union by timestamp
Regenerable derived files index.md, .pensar/manifest.yml, site/ regenerate from merged source
Lint-level wiki diff several wiki/*.md take the lint-clean side per hunk (fixed [[wikilinks]], fixed frontmatter, removed broken example-links)
Superset wiki page one page take the superset
Genuine content / config CLAUDE.md, config value human

8 of 10 needed no human prose judgment.

Proposal: pensar merge

Given two diverged vault states (or ours/theirs at a git merge):

  1. Union the append-only log.md chronologically by timestamp — never a git conflict.
  2. Regenerate derived artifacts from merged source: index.md (update_index), .pensar/manifest.yml (needs a full rebuild — only per-entry update_manifest exists today), and the exported site/. Never line-merge generated files.
  3. Auto-resolve wiki pages where mechanical: one side a strict superset, or one side lint-clean and the other not (run lint() on both candidates; prefer fewer broken wikilinks / valid frontmatter). NB lint-correctness cuts both ways — a deliberately de-linked example ([Machine Learning], not [[...]]) can be the correct side.
  4. Surface only genuine divergence (both sides edited the same page's prose, or a config value disagrees) for human reconciliation, with a clear per-file diff.

Also: retire the "local-only / no GitHub for privacy" single-author assumption in the docs; distinguish private single-author vaults from shared multi-author vaults.

Open questions

  • Manifest rebuild: re-scan raw/+wiki/ to recompute hashes, or union the two manifests by path key (what the manual merge did)?
  • Page identity across authors: two authors creating the same slug independently is the add/add case — does a stable address:/page_uid (see the adopt-mode design) make this cleaner?
  • Delivery: a git merge driver registered per file pattern, or a standalone pensar merge <other> command?

Full design note: corteza/cornelius vault wiki/pensar-multi-user-merge.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions