chore: remove internal documents and service directories (P2.2 part 1)

The commercial repository carries the product's internal history: audits,
screenshots, briefs, decisions, pricing, publication drafts, personal data
and research runs. None of it belongs in the community edition.

- delete judging/, "UAT 3/", benchmarks/ (including LoCoMo data under
  CC BY-NC), preflight-results/, gepa-phase-5/, notes/, decisions/,
  .understand-anything/, .agents/, .lovable/, the legacy sidecar/ package
  and waggle-cowork/ (an analysis of Claude Code sources)
- delete docs/ except docs/oss, the user guides (without the team-mode
  guide), the reference, methodology, architecture, getting-started and
  contributing pages, which P2.4 rewrites
- delete render.yaml, .parity-allowlist, the retired mind-parity and
  sync-mind workflows and 29 one-off scripts nothing references
- delete tests that only checked removed files (sidecar package, Render
  blueprint, UAT capture, benchmark harness isolation, internal audit and
  signing docs); drop sidecar/ and benchmarks/ from the hive-mind subtree
  split guard; prune ignore, attribute, lint and test globs
- replace the commercial README with an interim one for this edition

Source comments still point at some deleted docs; P2.2 part 2 cleans them
together with names and paths.
This commit is contained in:
shumeiko.it
2026-10-20 01:02:18 +02:00
parent 2e1999a3f6
commit 5f088698dd
1383 changed files with 67 additions and 503605 deletions

View File

@@ -1,183 +0,0 @@
name: mind-parity-check
# DEPRECATED 2026-04-30 — CC Sesija B monorepo migration §2.6 Task B22.
#
# This workflow ran the (then-external) hive-mind repo's mind/+harvest/ tests
# against waggle-os's substrate to verify behavioral parity while the same code
# lived in both repos. After CC Sesija B migration, the substrate lives ONLY in
# waggle-os/packages/hive-mind-core/. The OSS mirror at
# github.com/marolinik/hive-mind is a separately curated layout produced from
# that canonical source. It is intentionally not byte-identical: imports and
# layout differ, and excluded files plus interleaved `install_audit` logic are
# removed during the maintainer-reviewed forward-port.
#
# This workflow is preserved as the deprecation anchor. It will NOT fire on
# push because trigger paths (packages/core/src/mind/**) no longer exist as
# tracked content. See sync-mind.yml's deprecation note for the full migration
# context. Do not reactivate this injection workflow as a substitute for the
# current drift review, curated export, and public-mirror test gates.
# Memory Sync Repair Step 3.1. Verifies that hive-mind's mind/ + harvest/
# tests pass against waggle-os's substrate. The check runs the waggle-os
# committed Step 2 ports (which include adapted versions like db.test.ts)
# AS BASELINE, then ALSO injects the latest hive-mind tests into the
# waggle-os checkout under `<basename>-hive-mind.test.ts` filenames so
# any NEW hive-mind cases since the Step 2 port get exercised.
#
# Triggers ONLY when shared substrate paths change. Failure blocks merge
# unless the failing test is allowlisted in `.parity-allowlist` at the
# repo root with a documented reason.
#
# See `.github/sync.md` for full design rationale and allowlist policy.
on:
push:
branches: [main]
paths:
- 'packages/core/src/mind/**'
- 'packages/core/src/harvest/**'
- 'packages/core/tests/mind/**'
pull_request:
branches: [main]
paths:
- 'packages/core/src/mind/**'
- 'packages/core/src/harvest/**'
- 'packages/core/tests/mind/**'
concurrency:
group: mind-parity-${{ github.ref }}
cancel-in-progress: true
jobs:
parity-check:
# Permanently inert deprecation anchor. The old test-injection model is not a
# safe substitute for the curated forward-port and drift-review workflow.
if: ${{ false }}
name: hive-mind ↔ waggle-os mind substrate parity
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout waggle-os
uses: actions/checkout@v4
with:
path: waggle-os
- name: Checkout hive-mind master
uses: actions/checkout@v4
with:
repository: marolinik/hive-mind
ref: master
path: hive-mind
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('waggle-os/**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install waggle-os dependencies
working-directory: waggle-os
run: npm install
- name: Run waggle-os baseline mind/ tests (committed Step 2 ports)
working-directory: waggle-os
run: npx vitest run --reporter=default packages/core/tests/mind/
- name: Inject latest hive-mind tests as -hive-mind suffix files
working-directory: waggle-os
run: |
set -euo pipefail
allowlist_file=".parity-allowlist"
allowlist_basenames=()
if [ -f "$allowlist_file" ]; then
while IFS= read -r line; do
# Strip comments + leading/trailing whitespace; skip blanks
clean="${line%%#*}"
clean="$(echo "$clean" | tr -d '[:space:]')"
[ -z "$clean" ] && continue
allowlist_basenames+=("$clean")
done < "$allowlist_file"
echo "Allowlist entries: ${allowlist_basenames[@]:-<none>}"
else
echo "No .parity-allowlist file present — no skips."
fi
# Helper: is a basename in the allowlist?
is_allowlisted() {
local name="$1"
for a in "${allowlist_basenames[@]:-}"; do
[ "$a" = "$name" ] && return 0
done
return 1
}
target_dir="packages/core/tests/mind"
source_dir="../hive-mind/packages/core/src/mind"
injected=0
skipped=0
already_committed=0
for src in "$source_dir"/*.test.ts; do
[ -e "$src" ] || continue
base="$(basename "$src" .test.ts)"
target_name="${base}-hive-mind.test.ts"
target_path="$target_dir/$target_name"
if is_allowlisted "$target_name"; then
echo " SKIP (allowlist): $target_name"
skipped=$((skipped + 1))
continue
fi
if [ -f "$target_path" ]; then
# File is committed (Step 2 port). Preserve its bespoke
# header comments + any waggle-os adaptations. The
# committed version IS what the parity check should
# exercise — it's exactly what landed in main.
already_committed=$((already_committed + 1))
echo " KEEP (committed): $target_name"
continue
fi
cp "$src" "$target_path"
# Adapt import paths from hive-mind's adjacent style (`./x.js`) to
# waggle-os's separate-tests-folder style (`../../src/mind/x.js`).
sed -i "s|from \"\\./|from \"../../src/mind/|g" "$target_path"
sed -i "s|from '\\./|from '../../src/mind/|g" "$target_path"
injected=$((injected + 1))
echo " INJECT: $target_name"
done
echo ""
echo "Injected: $injected new hive-mind test file(s) under -hive-mind suffix"
echo "Kept: $already_committed already-committed Step 2 port file(s)"
echo "Skipped: $skipped allowlisted file(s)"
- name: Run combined waggle-os + injected hive-mind suite
working-directory: waggle-os
run: npx vitest run --reporter=default packages/core/tests/mind/
- name: Informational diff — shared substrate file sizes
working-directory: waggle-os
if: always()
run: |
echo "## Substrate file size comparison (informational)"
for f in db.ts schema.ts frames.ts search.ts knowledge.ts identity.ts awareness.ts sessions.ts scoring.ts reconcile.ts ontology.ts concept-tracker.ts entity-normalizer.ts embedding-provider.ts inprocess-embedder.ts; do
wf="packages/core/src/mind/$f"
hf="../hive-mind/packages/core/src/mind/$f"
if [ -f "$wf" ] && [ -f "$hf" ]; then
wsize=$(wc -c < "$wf")
hsize=$(wc -c < "$hf")
diff_pct=$(awk -v w="$wsize" -v h="$hsize" 'BEGIN { if (h == 0) print "n/a"; else printf "%.1f%%", ((w - h) / h) * 100 }')
echo " $f: waggle-os=$wsize hive-mind=$hsize delta=$diff_pct"
fi
done

View File

@@ -1,233 +0,0 @@
name: sync-mind-to-hive-mind
# DEPRECATED 2026-04-30 — CC Sesija B monorepo migration §2.6 Task B22.
#
# This workflow was the bidirectional-sync mechanism between waggle-os and the
# public `marolinik/hive-mind` repo while substrate code lived in BOTH
# places (packages/core/src/mind/ + packages/core/src/harvest/ in waggle-os,
# duplicated in hive-mind/packages/core/src/{mind,harvest}/).
#
# After CC Sesija B migration (commits ff5b4aa..b59d188 on
# feature/hive-mind-monorepo-migration), the substrate lives ONLY in
# waggle-os/packages/hive-mind-core/. The public mirror now has a curated layout
# and is updated through a maintainer-reviewed forward-port that removes excluded
# files and interleaved `install_audit` logic. Raw subtree branches are unsafe
# publish sources; see `packages/hive-mind-core/CONTRIBUTING.md`.
#
# This workflow is preserved for AUDIT TRAIL purposes (the historical
# trigger paths and concurrency settings are referenced in EXTRACTION.md and
# the .github/sync.md operating manual). It will NOT fire on push because the
# trigger paths (packages/core/src/mind/** + packages/core/src/harvest/**) no
# longer exist as tracked content — they were git-mv'd to packages/hive-mind-core/
# on commit 3b556c0.
#
# DO NOT delete this file as part of cleanup — leave it as the deprecation
# anchor. Do not reactivate it by changing trigger paths: its filtered-patch
# model cannot safely remove interleaved proprietary schema logic. Build any
# future automation from the curated-forward-port contract instead.
# Memory Sync Repair Step 3.2 — waggle-os → hive-mind direction.
#
# Triggered when waggle-os main receives a push that touches shared
# substrate paths (mind/ or harvest/), this workflow extracts the
# filtered diff (excluding NOT-extracted files per EXTRACTION.md), opens
# a PR against marolinik/hive-mind master with the patch applied, and
# tags the PR with the source SHA.
#
# This is the SECONDARY direction empirically — Steps 1+2 found
# hive-mind is the more active substrate repo (ahead in 2/5 audit
# dimensions, +14 organic test files). The PRIMARY direction
# (hive-mind push → auto-PR ka waggle-os) is intentionally NOT
# implemented in this file because it requires a workflow living in
# the hive-mind repo, which is out of CC-2 scope. It will be added
# via a sibling PR to hive-mind once Step 3 here is ratified.
#
# See `.github/sync.md` for full design rationale, EXTRACTION.md
# filter list, and how to extend bidirectional sync.
on:
push:
branches: [main]
paths:
- 'packages/core/src/mind/**'
- 'packages/core/src/harvest/**'
concurrency:
group: sync-mind-${{ github.ref }}
# Don't cancel — every main push to mind/ or harvest/ deserves its own
# sync attempt (the resulting hive-mind PR is per-commit traceable).
cancel-in-progress: false
jobs:
open-hive-mind-pr:
# Permanently inert deprecation anchor. This filtered-patch publisher cannot
# enforce the current interleaved proprietary-content boundary.
name: Open auto-sync PR to marolinik/hive-mind
runs-on: ubuntu-latest
timeout-minutes: 10
# `HIVE_MIND_SYNC_TOKEN` is a fine-grained PAT scoped to
# marolinik/hive-mind with `pull_request: write` + `contents: write`.
# Configured by Marko via `gh secret set HIVE_MIND_SYNC_TOKEN`.
# Without the secret, the job fails fast with a documented error
# rather than silently skipping.
if: ${{ false }}
steps:
- name: Checkout waggle-os (full history for the diff)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify HIVE_MIND_SYNC_TOKEN is configured
run: |
if [ -z "${{ secrets.HIVE_MIND_SYNC_TOKEN }}" ]; then
echo "::error::HIVE_MIND_SYNC_TOKEN secret is not configured."
echo "::error::Run: gh secret set HIVE_MIND_SYNC_TOKEN --repo marolinik/waggle-os"
echo "::error::See .github/sync.md for full setup instructions."
exit 1
fi
- name: Compute filtered diff (exclude NOT-extracted paths)
id: diff
run: |
set -euo pipefail
# Files that MUST be excluded from sync per EXTRACTION.md
# "NOT Extracted" section. Sync attempts that include these paths
# would leak Waggle-specific code (vault, compliance, evolution,
# tier system) into the hive-mind Apache-2.0 release artifact.
excluded_paths=(
'packages/core/src/mind/vault.ts'
'packages/core/src/mind/evolution-runs.ts'
'packages/core/src/mind/execution-traces.ts'
'packages/core/src/mind/improvement-signals.ts'
'packages/core/src/compliance'
)
# Build the rev range. `${{ github.event.before }}` is the parent
# commit of this push; `${{ github.sha }}` is the new HEAD. For a
# branch's first push or a force-push, `before` may be all-zeros;
# in that case fall back to the previous merge-base via reflog.
before_sha='${{ github.event.before }}'
after_sha='${{ github.sha }}'
if [ "$before_sha" = "0000000000000000000000000000000000000000" ]; then
echo "::warning::push has no `before` SHA — falling back to HEAD~1"
before_sha="$(git rev-parse HEAD~1)"
fi
# All shared-substrate files in this push, before exclusion.
changed=$(git diff --name-only "$before_sha" "$after_sha" -- \
'packages/core/src/mind/**' 'packages/core/src/harvest/**')
# Apply EXTRACTION.md "NOT extracted" exclusions.
filtered_files=()
while IFS= read -r f; do
[ -z "$f" ] && continue
skip=false
for excl in "${excluded_paths[@]}"; do
case "$f" in
"$excl"|"$excl"/*)
skip=true
break
;;
esac
done
$skip || filtered_files+=("$f")
done <<< "$changed"
if [ ${#filtered_files[@]} -eq 0 ]; then
echo "No syncable changes after EXTRACTION.md filtering."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Files to sync:"
printf ' %s\n' "${filtered_files[@]}"
# Generate a patch limited to the filtered files. This patch will
# apply to hive-mind because the directory layout matches:
# waggle-os `packages/core/src/{mind,harvest}/...` ↔
# hive-mind `packages/core/src/{mind,harvest}/...`.
mkdir -p .sync-output
git diff "$before_sha" "$after_sha" -- "${filtered_files[@]}" > .sync-output/patch.diff
# Capture the original commit subjects for the PR description.
git log --format='- %h %s' "$before_sha".."$after_sha" -- "${filtered_files[@]}" > .sync-output/commits.txt
echo "skip=false" >> "$GITHUB_OUTPUT"
echo "after_sha=$after_sha" >> "$GITHUB_OUTPUT"
echo "after_short=$(git rev-parse --short "$after_sha")" >> "$GITHUB_OUTPUT"
echo "first_subject=$(git log -1 --format=%s "$after_sha")" >> "$GITHUB_OUTPUT"
- name: Checkout hive-mind for patch application
if: steps.diff.outputs.skip != 'true'
uses: actions/checkout@v4
with:
repository: marolinik/hive-mind
ref: master
token: ${{ secrets.HIVE_MIND_SYNC_TOKEN }}
path: hive-mind
fetch-depth: 0
- name: Apply patch to hive-mind branch + push
if: steps.diff.outputs.skip != 'true'
working-directory: hive-mind
env:
GH_TOKEN: ${{ secrets.HIVE_MIND_SYNC_TOKEN }}
run: |
set -euo pipefail
branch_name="auto-sync/waggle-os-${{ steps.diff.outputs.after_short }}"
git config user.name 'waggle-os-sync-bot'
git config user.email 'sync-bot@waggle-os.ai'
git checkout -b "$branch_name"
# Apply the filtered patch. The waggle-os layout is identical
# under packages/core/src/{mind,harvest}/ so the patch applies
# directly without `--directory` rewriting.
if ! git apply --3way ../.sync-output/patch.diff; then
echo "::error::Patch did not apply cleanly. Manual reconciliation required."
echo "::error::Source SHA: ${{ steps.diff.outputs.after_sha }}"
exit 1
fi
git add -A
git commit -m "chore(sync): auto-sync from waggle-os@${{ steps.diff.outputs.after_short }}
Source: marolinik/waggle-os main @ ${{ steps.diff.outputs.after_sha }}
Subject: ${{ steps.diff.outputs.first_subject }}
See PR description for the full list of waggle-os commits in this batch."
git push origin "$branch_name"
- name: Open PR on hive-mind
if: steps.diff.outputs.skip != 'true'
working-directory: hive-mind
env:
GH_TOKEN: ${{ secrets.HIVE_MIND_SYNC_TOKEN }}
run: |
set -euo pipefail
branch_name="auto-sync/waggle-os-${{ steps.diff.outputs.after_short }}"
commit_list="$(cat ../.sync-output/commits.txt)"
gh pr create \
--repo marolinik/hive-mind \
--base master \
--head "$branch_name" \
--title "auto-sync from waggle-os@${{ steps.diff.outputs.after_short }}: ${{ steps.diff.outputs.first_subject }}" \
--body "$(printf 'Automated cross-repo sync — Memory Sync Repair Step 3.2 (waggle-os → hive-mind direction).\n\n## Source\n- Repo: marolinik/waggle-os\n- Branch: main\n- HEAD: %s\n- Workflow run: %s/%s/actions/runs/%s\n\n## Filtering\nThis patch was filtered to exclude paths listed under "NOT Extracted" in EXTRACTION.md:\n- packages/core/src/mind/vault.ts\n- packages/core/src/mind/evolution-runs.ts\n- packages/core/src/mind/execution-traces.ts\n- packages/core/src/mind/improvement-signals.ts\n- packages/core/src/compliance\n\n## Originating commits in this batch\n\n%s\n\n## Review checklist\n- [ ] Patch applied cleanly to hive-mind master without 3-way conflicts\n- [ ] No NOT-extracted paths sneaked through (sanity-check the diff against EXTRACTION.md)\n- [ ] Test deltas (if any) make sense for the OSS surface; no Waggle-specific test fixtures\n- [ ] mind-parity-check on waggle-os side is GREEN before merging this PR (otherwise the sync would re-introduce a regression)' \
"${{ steps.diff.outputs.after_sha }}" \
"${{ github.server_url }}" \
"${{ github.repository }}" \
"${{ github.run_id }}" \
"$commit_list")"
- name: Upload patch as artifact (debug aid)
if: always() && steps.diff.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: sync-patch-${{ steps.diff.outputs.after_short }}
path: .sync-output/
retention-days: 30