Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Retrospection on how oss sync works now (#2564)
robert-inkeep269ba5c33c5e
diff --git a/.github/scripts/bridge-public-pr-to-monorepo.mjs b/.github/scripts/bridge-public-pr-to-monorepo.mjsindex 4da8c41b9..b83109cd6 100644--- a/.github/scripts/bridge-public-pr-to-monorepo.mjs+++ b/.github/scripts/bridge-public-pr-to-monorepo.mjs@@ -515,13 +515,13 @@ ${buildBridgeMetadata(publicPr, mirrorPath)}`;function buildPublicComment({ publicPr, status, details }) {if (status === 'synced') {return `${BRIDGE_COMMENT_MARKER}-Thanks for the contribution! A maintainer will review and merge your PR. Your commit attribution is preserved as @${publicPr.user.login}.+Thanks for the contribution! A maintainer will review and merge your PR. Your contribution will be credited with a Co-authored-by trailer for @${publicPr.user.login} (you'll appear as a co-author on the merged commit).**What happens next:**- A maintainer will review your PR.- If you don't hear back within a few business days, please comment here to nudge — that's the right thing to do, not annoying.-- When your change is accepted, this PR closes automatically. Don't be alarmed when it closes — that's how it merges, and your authorship is preserved.+- When your change is accepted, this PR closes automatically. Don't be alarmed when it closes — that's how it lands here, with your contribution credited.This comment will be updated as the status changes.`;}@@ -551,7 +551,7 @@ ${details}`;return `${BRIDGE_COMMENT_MARKER}Thanks for the contribution! Your PR **could not be merged automatically**: it overlaps other changes that aren't visible here, so a maintainer needs to reconcile it by hand.-**No action is needed from you.** Your PR is already based on the latest \`${publicPr.base.repo.full_name}\` main; the overlap is on our side, not something to fix from your branch. Your commit attribution is preserved as @${publicPr.user.login}.+**No action is needed from you.** Your PR is already based on the latest \`${publicPr.base.repo.full_name}\` main; the overlap is on our side, not something to fix from your branch. Your contribution will be credited with a Co-authored-by trailer for @${publicPr.user.login} (you'll appear as a co-author on the merged commit).A maintainer will resolve it and land your change; this PR will close automatically once it merges. This comment will be updated as the status changes.`;}@@ -713,8 +713,8 @@ function createClaGateGh({// the apply block is skipped) instead of being silently lost.const CONFLICT_COMMIT_MARKER = 'with conflicts; needs manual resolution';-// True when an internal mirror commit message marks a conflict-carrying bridge-// commit (see CONFLICT_COMMIT_MARKER), used to keep that PR held draft across+// True when a bridge commit message marks a conflict-carrying sync commit (see+// CONFLICT_COMMIT_MARKER), used to keep that PR held draft across// metadata-only re-syncs.function commitIndicatesConflicts(commitMessage) {return typeof commitMessage === 'string' && commitMessage.includes(CONFLICT_COMMIT_MARKER);@@ -813,8 +813,8 @@ async function syncPublicPr() {// when public-mirror-sync is stalled and agents-private/main has// drifted from `inkeep/<repo>/main`. Without this, every conflicting// hunk fails with "repository lacks the necessary blob to perform- // 3-way merge" — the dominant bridge-failure pattern observed on- // `inkeep/open-knowledge-legacy#411`, `#396`, `#374`.+ // 3-way merge" — the dominant bridge-failure pattern for drifted+ // public PRs.// 2. Provides the baseline pair of refs for the local-git-diff fallback// when the GitHub diff endpoint rejects the PR as too large.const sourceRemote = `bridge-public-${publicPrNumber}`;@@ -831,8 +831,7 @@ async function syncPublicPr() {try {// Initial fetch: --depth=10000 covers the long-running branches that- // trip the size-fallback (e.g. inkeep/open-knowledge-legacy#377 with 78- // commits). On the rare branch whose merge-base is deeper, the+ // trip the size-fallback. On the rare branch whose merge-base is deeper, the// subsequent `git diff base...head` errors clearly with "no merge// base" rather than producing a wrong diff — so we re-fetch with// increasing depth before giving up.diff --git a/AGENTS.md b/AGENTS.mdindex eca793a8f..1e35f027c 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1,6 +1,6 @@# OpenKnowledge Agent Guide-This is the public mirror of OpenKnowledge. Keep changes compatible with the internal source path `public/open-knowledge/` in `inkeep/agents-private`.+This is the public OpenKnowledge repository. Keep changes compatible with the published package and standalone clone experience.## Start Here@@ -8,8 +8,6 @@ This is the public mirror of OpenKnowledge. Keep changes compatible with the int- Read [CONTRIBUTING.md](./CONTRIBUTING.md) before changing public PR flow, dependencies, or exported docs.- Use Bun 1.3.13 or newer and Node.js 24 or newer.-For maintainers working inside `inkeep/agents-private`, start OpenKnowledge agent sessions from `public/open-knowledge/` when possible. If launched at the monorepo root, first read `public/open-knowledge/AGENTS.md`, then run Bun/build/test commands with cwd set to `public/open-knowledge`.-## Commands```bash@@ -48,8 +46,8 @@ bun run dev## Public Mirror Rules-- This repo is generated from an allowlist. Do not rely on hidden internal folders being present.-- Public PRs are mirrored into `inkeep/agents-private` for review and merge, then synced back here.+- This repo is generated from an allowlist. Do not rely on hidden source-only folders being present.+- Public PRs are reviewed by maintainers and accepted changes sync back here automatically. A PR may close rather than show as merged; that is expected for this mirror.- Top-level public docs such as `README.md`, `CONTRIBUTING.md`, and `AGENTS.md` are overlay files. Keep them public-safe and standalone.- Do not add secrets, private customer context, internal-only specs, local paths, or generated debug artifacts.- Keep dependency updates paired with `bun.lock`. Run `bun run notices` when third-party notices may change.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 6060ae74b..803969b9d 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -58,7 +58,7 @@ First-time contributors are asked to sign our [Contributor License Agreement](./- Never include secrets, credentials, customer data, or local machine paths.- Enable **Allow edits from maintainers** so reviewers can push fixes to your branch.-A maintainer will review your PR; if you don't hear back within a few business days, a friendly nudge on the thread is welcome. Accepted changes land on `main` with your authorship preserved (your PR may show as closed rather than merged).+A maintainer will review your PR; if you don't hear back within a few business days, a friendly nudge on the thread is welcome. Accepted changes land on `main` with your contribution credited through co-author trailers (your PR may show as closed rather than merged).## License