|
| 1 | +# AgentsView + Periscope: fresh upstream replay vs integrative `merged` |
| 2 | + |
| 3 | +**Date:** 2026-07-28 |
| 4 | +**Status:** reference architecture note |
| 5 | +**Scope:** explain why `cursor/agentsview-modernization-3way-f559` looks like a fresh |
| 6 | +AgentsView import with Periscope treatment, how that differs from `origin/merged`, |
| 7 | +and what to do when opening a clean modernization PR. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## TL;DR |
| 12 | + |
| 13 | +`cursor/agentsview-modernization-3way-f559` is **not** `origin/merged` grown forward. |
| 14 | +It is, in essence: |
| 15 | + |
| 16 | +> **Current upstream AgentsView product code + Periscope identity/integration on top** |
| 17 | +
|
| 18 | +replayed from an **old shared ancestor**, which is why PR #17 shows **769 commits / |
| 19 | +2,169 files** even when the tip tree may be the desired product shape. |
| 20 | + |
| 21 | +To land modernization cleanly: start from **current `origin/merged`**, apply the |
| 22 | +**final tree delta** from the modernization branch, and **union** integrative |
| 23 | +`merged`-only assets (docs, ECC commands, tooling) that the replay dropped. |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +## The fork point: Wes McKinney's last commit before Periscope |
| 28 | + |
| 29 | +Commit [`47ca74c`](https://github.com/diazMelgarejo/periscope/commit/47ca74c675c7292490c903f8b4497875f8267faa) |
| 30 | +is significant on the **Periscope formation line**: |
| 31 | + |
| 32 | +| Field | Value | |
| 33 | +|-------|-------| |
| 34 | +| SHA | `47ca74c675c7292490c903f8b4497875f8267faa` | |
| 35 | +| Author | Wes McKinney | |
| 36 | +| Date | 2026-04-18 | |
| 37 | +| Subject | `fix(parser): skip git-root walk for foreign-OS cwds (#352)` | |
| 38 | +| Parent on Periscope line | *(none upstream of Periscope work)* | |
| 39 | +| Child on Periscope line | `c1126d94` — **New specification for the Periscope project** | |
| 40 | + |
| 41 | +On the `merged` / Periscope integrative line, `47ca74c` is the **last upstream Wes |
| 42 | +commit immediately before Periscope was formed**. The very next commit is the |
| 43 | +Periscope specification. |
| 44 | + |
| 45 | +Upstream `agentsview` continued after `47ca74c` — Wes authored **201 more commits** |
| 46 | +there (through `#1283` at tip). That is a **different branch of history**, not the |
| 47 | +Periscope formation line. |
| 48 | + |
| 49 | +### Did `47ca74c` survive in the fresh treatment branch? |
| 50 | + |
| 51 | +| Lineage | Present as SHA? | Patch/content present? | |
| 52 | +|---------|-----------------|------------------------| |
| 53 | +| `origin/merged` | **Yes** — direct ancestor | Yes (`47ca74c`) | |
| 54 | +| `origin/agentsview` | **Yes** — direct ancestor | Yes (`47ca74c`) | |
| 55 | +| `cursor/agentsview-modernization-3way-f559` | **No** — not an ancestor | **Yes** — replayed as `22cf1394` (identical commit tree `%T`) | |
| 56 | + |
| 57 | +So: **the change survived in both lineages**, but the modernization replay branch |
| 58 | +carries it under a **different commit SHA** because upstream history was replayed, |
| 59 | +not inherited. |
| 60 | + |
| 61 | +```bash |
| 62 | +# Same tree for the #352 parser fix in both SHAs: |
| 63 | +git rev-parse 47ca74c^{tree} # 798ccbe90e9a7fa0d937d664f92efe00986f91f5 |
| 64 | +git rev-parse 22cf1394^{tree} # 798ccbe90e9a7fa0d937d664f92efe00986f91f5 |
| 65 | +``` |
| 66 | + |
| 67 | +**Patch-id equivalence** (`git cherry -v`) also marks the modernization branch as |
| 68 | +already containing this change (`-` prefix = patch present under another SHA). |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## Mental model: two histories, one product goal |
| 73 | + |
| 74 | +```mermaid |
| 75 | +flowchart TD |
| 76 | + A["Shared ancestor (~5f9e809f)"] --> B["merged line<br/>830 integrative commits<br/>PRs #10–#15, dual-pedigree reanchor"] |
| 77 | + A --> C["AgentsView upstream replay<br/>~769 commits"] |
| 78 | + W["47ca74c — last Wes commit<br/>before Periscope spec"] --> P["c1126d94 — Periscope spec"] |
| 79 | + P --> B |
| 80 | + C --> D["+ Periscope identity port"] |
| 81 | + D --> E["+ synthesis delta replay"] |
| 82 | + E --> F["+ ECC / guard restore"] |
| 83 | + F --> G["cursor/agentsview-modernization-3way-f559 tip<br/>(14dcd10d)"] |
| 84 | + B --> H["origin/merged today<br/>(705e3125 incl. PR #15)"] |
| 85 | +``` |
| 86 | + |
| 87 | +### What each line represents |
| 88 | + |
| 89 | +| Branch / line | What it is | |
| 90 | +|---------------|------------| |
| 91 | +| `origin/merged` | Integrative Periscope fork: upstream AgentsView history **as inherited**, plus Periscope specs, rename catalogue, ECC bundles, desktop sidecar alignment, layer-2 synthesis docs | |
| 92 | +| `origin/agentsview` | Pure upstream mirror (latentsignal lineage) | |
| 93 | +| `cursor/agentsview-modernization-3way-f559` | **Fresh upstream replay**: current AgentsView codebase re-imported, then Periscope identity and synthesis replayed on top — **not** rebased onto current `merged` | |
| 94 | + |
| 95 | +### Why PR #17 looks enormous |
| 96 | + |
| 97 | +GitHub's three-dot PR diff (`merged...modernization`) measures changes since the |
| 98 | +**merge-base** (`5f9e809f`), not since today's `merged` tip. |
| 99 | + |
| 100 | +| Metric | Value | Meaning | |
| 101 | +|--------|-------|---------| |
| 102 | +| Merge-base age | `5f9e809f` | Ancient divergence point | |
| 103 | +| Commits on modernization not in `merged` | 769 | Full upstream replay stack | |
| 104 | +| Commits on `merged` not in modernization | 830 | Integrative work modernization missed | |
| 105 | +| Three-dot PR diff (`merged...modernization`) | 2,169 files | Entire replay since merge-base | |
| 106 | +| Symmetric tree diff (`merged` ↔ modernization tip) | 2,065 files | Honest product delta at tips | |
| 107 | + |
| 108 | +**The commit graph is wrong for review; the tip tree may still be right.** |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## What the modernization branch is (and is not) |
| 113 | + |
| 114 | +### It **is** |
| 115 | + |
| 116 | +- Current upstream AgentsView runtime (Go backend, Svelte frontend, desktop, build) |
| 117 | + replayed commit-by-commit from old ancestry |
| 118 | +- Periscope identity port (`refactor(identity): port Periscope runtime onto current AgentsView`) |
| 119 | +- Prior Periscope synthesis delta replay (`replay: prior Periscope synthesis delta`) |
| 120 | +- ECC / guard restoration at the tip |
| 121 | +- Verification gate stabilization commits |
| 122 | + |
| 123 | +Functionally: **AgentsView today + Periscope treatment**. |
| 124 | + |
| 125 | +### It is **not** |
| 126 | + |
| 127 | +- A superset of current `origin/merged` |
| 128 | +- A branch that inherited integrative PRs #10–#15 by ancestry |
| 129 | +- Safe to merge via ancestry alone without harmonization |
| 130 | + |
| 131 | +### Paths present on `merged` but dropped by modernization tip (~41 files) |
| 132 | + |
| 133 | +Examples (union candidates when replaying onto `merged`): |
| 134 | + |
| 135 | +- `docs/INTEGRATION-ORAMASYS-STACK-PLAN.md` |
| 136 | +- `docs/INTEGRATION-SYNTHESIS-LAYER2-ANALYSIS.md` |
| 137 | +- `.claude/commands/{database-migration,feature-development,refactoring}.md` |
| 138 | +- `.github/dependabot.yml` |
| 139 | +- `PROGRESS.md` |
| 140 | +- `periscope` wrapper script |
| 141 | + |
| 142 | +Many other "deletions" are intentional upstream product refactors (renamed/moved |
| 143 | +files), not integrative regressions. Classify per path during replay. |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## Do we need tree-twin repair? |
| 148 | + |
| 149 | +**No** — not for this problem. |
| 150 | + |
| 151 | +| Tool / concept | When to use | Applies here? | |
| 152 | +|----------------|-------------|---------------| |
| 153 | +| Tree-twin / `reanchor_scan.sh` | Judge whether a branch is already in `main` after history rewrite | No | |
| 154 | +| Integrative path-scoped replay | Graft desired tip tree onto current integration base | **Yes** | |
| 155 | +| Plain `git rebase` across 800 commits | Never across dual-pedigree / upstream replay boundaries | No | |
| 156 | + |
| 157 | +Same doctrine as ECC harmonization (PR #18): **synthesize, never amputate**. |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +## Recommended landing strategy (when ready) |
| 162 | + |
| 163 | +Leave `cursor/agentsview-modernization-3way-f559` and PR #17 alone. Open a **new** |
| 164 | +thin branch: |
| 165 | + |
| 166 | +1. **Base:** `origin/merged` (post PR #15, `705e3125`) |
| 167 | +2. **Product tree:** take modernization tip (`14dcd10d`) for runtime/product paths |
| 168 | +3. **Union:** restore `merged`-only integrative docs, ECC commands, tooling |
| 169 | +4. **Harmonize:** `ecc-tools.json`, skills, `AGENTS.md` — superset merge |
| 170 | +5. **Commit:** 1–3 focused commits (not 769) |
| 171 | +6. **Verify:** |
| 172 | + - `go test -tags fts5 ./...` |
| 173 | + - `npm --prefix frontend run check` |
| 174 | + - `npm test` |
| 175 | +7. **PR base:** `merged` (not `main`) |
| 176 | + |
| 177 | +Expected PR shape: still ~2k files (honest modernization size), but **1–3 commits** |
| 178 | +with correct ancestry. |
| 179 | + |
| 180 | +--- |
| 181 | + |
| 182 | +## Key refs (2026-07-28) |
| 183 | + |
| 184 | +| Ref | SHA | Role | |
| 185 | +|-----|-----|------| |
| 186 | +| `origin/merged` | `705e3125` | Canonical integrative line (incl. PR #15) | |
| 187 | +| `origin/agentsview` | `6c3317ad` | Upstream mirror tip | |
| 188 | +| `cursor/agentsview-modernization-3way-f559` | `14dcd10d` | Fresh replay + Periscope treatment | |
| 189 | +| Fork point (Wes → Periscope) | `47ca74c` → `c1126d94` | Last upstream commit before Periscope spec | |
| 190 | +| Merge-base (modernization ↔ merged) | `5f9e809f` | Ancient divergence — explains PR #17 size | |
| 191 | + |
| 192 | +--- |
| 193 | + |
| 194 | +## Related docs |
| 195 | + |
| 196 | +| Doc | Topic | |
| 197 | +|-----|-------| |
| 198 | +| `docs/INTEGRATION-ORAMASYS-STACK-PLAN.md` | L4 orchestration contract | |
| 199 | +| `docs/INTEGRATION-SYNTHESIS-LAYER2-ANALYSIS.md` | Layer-2 integrative synthesis card | |
| 200 | +| `.agent/memory/working/PERISCOPE_MERGED_LOCAL_INTEGRATIVE_SYNTHESIS_2026-07-28.md` | Dual-pedigree salvage playbook (PT workspace) | |
| 201 | + |
| 202 | +--- |
| 203 | + |
| 204 | +## Recall |
| 205 | + |
| 206 | +```bash |
| 207 | +python .agent/tools/recall.py "agentsview periscope fresh replay modernization ancestry" |
| 208 | +``` |
0 commit comments