wip: phase-01 paused — .continue-here.md handoff (pairs with c60b887 HANDOFF.json)
Human-readable handoff. Captures: - 3 BLOCKING CONSTRAINTS from saved memory (scope reduction, GSD ceremony, pre-checkpoint gates) - 3 anti-patterns from this session (improvised artifact types, claiming canonical without verifying, save-stops UX cycle) - Current state + working tree + test/build baseline - Next-session order of operations (10 steps) - Required reading order - Pending researcher brief (12 areas; was 529-blocked) - Infrastructure state + API capacity note - Followup backlog Resume: /clear → /gsd-resume-work Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,84 +1,153 @@
|
|||||||
---
|
---
|
||||||
context: phase
|
context: phase
|
||||||
phase: 01-stabilize-video-pipeline
|
phase: 01-stabilize-video-pipeline
|
||||||
wave: 2
|
status: paused
|
||||||
plan: 01-09
|
last_updated: 2026-05-19T15:53:41Z
|
||||||
status: in_progress (paused mid-fix)
|
|
||||||
last_updated: 2026-05-17T14:04:15Z
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# BLOCKING CONSTRAINTS — Read Before Anything Else
|
# BLOCKING CONSTRAINTS — Read Before Anything Else
|
||||||
|
|
||||||
These persist from prior sessions and were reaffirmed this session:
|
These persist from prior sessions and are reaffirmed this session:
|
||||||
|
|
||||||
- [ ] **CONSTRAINT: No unilateral scope reduction** — auto-memory `feedback-no-unilateral-scope-reduction.md`. Surface options via AskUserQuestion or default to FULL scope; never pre-narrow. Apply this to BOTH orchestrator AND when briefing subagents (subagents must not surface their own context anxiety as user-facing decisions).
|
- [ ] **No unilateral scope reduction** — auto-memory `feedback-no-unilateral-scope-reduction.md`. Surface options via AskUserQuestion or default to FULL scope; never pre-narrow. Applies to orchestrator AND subagent briefs.
|
||||||
- [ ] **CONSTRAINT: GSD ceremony for fixes** — auto-memory `feedback-gsd-ceremony-for-fixes.md`. Route bugs through /gsd-debug; orchestrator does not hot-edit src/.
|
- [ ] **GSD ceremony for fixes** — auto-memory `feedback-gsd-ceremony-for-fixes.md`. Bugs route through /gsd-debug; orchestrator does not hot-edit src/.
|
||||||
- [ ] **CONSTRAINT: Pre-checkpoint bundle gates** — auto-memory `feedback-pre-checkpoint-bundle-gates.md`. Before surfacing any operator empirical checkpoint, run: SW CSP grep (new Function/eval), SW Node-globals grep (Buffer.from), Tier-1 SW-bundle-import gate (`tests/background/sw-bundle-import.test.ts`), manifest validation. Failure = route to /gsd-debug, NOT to operator.
|
- [ ] **Pre-checkpoint bundle gates** — auto-memory `feedback-pre-checkpoint-bundle-gates.md`. Before surfacing any operator empirical checkpoint: SW CSP grep (new Function/eval) + SW Node-globals grep (Buffer.from) + DOM-globals grep + Tier-1 SW-bundle-import gate + manifest validation. Failure routes to /gsd-debug, not operator.
|
||||||
|
|
||||||
Acknowledge each before proceeding.
|
Acknowledge each before proceeding.
|
||||||
|
|
||||||
## Recurring anti-pattern this session
|
## Critical Anti-Patterns
|
||||||
|
|
||||||
**Subagent context-anxiety surfacing** — gsd-executor at 66% and gsd-debug-session-manager at 72% both surfaced "should I split / pause" as user-facing decisions despite explicit anti-context-anxiety directives in their spawn prompts. The saved memory covers orchestrator-side surfacing; subagent-side surfacing needs stronger handling. **For next session:** when spawning subagents, include explicit failure-path instructions ("if you genuinely run out: commit clean stopping point + return; orchestrator handles failover via fresh executor — do NOT pause for user decision").
|
| Pattern | Description | Severity | Prevention Mechanism |
|
||||||
|
|---------|-------------|----------|---------------------|
|
||||||
|
| Improvised artifact types | Created `01-11-PLAN-AMENDMENT-A.md` without checking GSD artifact-types.md; not a recognized type. Resolved via spike-pivot pattern (Plan 01-11 closed; new Plan 01-13 for proven architecture). | resolved | Cite a doc path when claiming GSD-canonical; never infer. Read `references/planner-revision.md` + `references/artifact-types.md` first. |
|
||||||
|
| Claiming "canonical" without verifying | Twice this session called things canonical based on inference. User caught both. | advisory | When recommending the canonical path, cite the workflow/reference doc; do not infer. |
|
||||||
|
| Save-stops UX cycle | Operator reported "doesn't switch off = bug"; shipped fix; operator realized original always-on was correct; reversed. Cycle landed in Amendments 2+3 of 01-09-PLAN.md. | advisory | When operator surfaces UX "bug" that's intentional behavior they observed but didn't expect, clarify charter intent BEFORE shipping a code change. Ask: "is this a bug, or is this unexpected behavior you'd like to confirm matches design intent?" |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Current State
|
## Current State
|
||||||
|
|
||||||
Phase 01 is mid-Wave-2 (Plan 01-09 closeout):
|
Phase 1 functional contract is **CLOSED via Plan 01-13's harness PASS** (`npm run test:uat` 15/15 GREEN; Bug A + Bug B regression-rewind demos empirically verified). Remaining Phase 1 work:
|
||||||
|
|
||||||
- **Plan 01-08 (WebM remux):** DONE. Resolved via 2-stage fix — resolve.alias for ebml CJS-main + vite-plugin-node-polyfills Buffer polyfill. Commits 5035314..e40949d. Tier-1 SW-bundle-import gate landed (`tests/background/sw-bundle-import.test.ts`, 2 layers).
|
- **Plan 01-10 (welcome tab)** — plan rewritten + design-swap-in-ready architecture (commit `3a530c2`); executor pending
|
||||||
- **Plan 01-09 Tasks 1-4:** DONE in code. Commits 333e0dc..c711d7e. 17 new tests GREEN. 81/81 vitest GREEN. tsc clean. Build exit 0.
|
- **Plan 01-12 (Design Integration)** — plan created (commit `8d1c8fb`); R2 Lora unblocked everything; executor pending
|
||||||
- **Plan 01-09 Task 5 operator empirical:** SURFACED 2 BUGS:
|
- **Install-flow + auto-select researcher** — 529'd twice during session; re-spawn pending
|
||||||
- **Bug A (icon files corrupt placeholders):** unblocked via auto-generated placeholders in working tree (uncommitted). icons/icon{16,48,128}.png at 574/1153/2615 bytes — all above Chrome notification API minimums.
|
|
||||||
- **Bug B (`setErrorMode` locks operator out):** state machine routes user-stopped-sharing → setErrorMode → popup stays SAVE-only → toolbar.onClicked won't fire → operator has no restart UI path. Plus recovery notification failed due to Bug A. Operator perception: "recording never stops."
|
**Designer responses outstanding: ZERO.** All 9 brand decisions resolved + R2 Lora reply landed (`--mks-font-display: "Lora", "Iowan Old Style", "Times New Roman", serif`). 8 i18n copy strings (Brief §02) inherit D-03 Sober defaults unless brand team overrides.
|
||||||
- **Design intel committed:** .planning/intel/design-system.md + assets-spec.md (commit 949aa03). Designer-team handoff specs.
|
|
||||||
- **D-13 trade-off confirmed:** operator reports "some seconds missing in tail." Documented architectural trade-off, NOT a Plan 01-09 regression. Defer to Phase 5 hardening (sub-second rotation OR in-flight inclusion with synthetic Matroska finalization).
|
|
||||||
|
|
||||||
Test/build baseline at pause:
|
Test/build baseline at pause:
|
||||||
- 81/81 vitest GREEN
|
- vitest **98/98 GREEN**
|
||||||
- Tier-1 SW-bundle-import gate (Layer 1 + Layer 2) GREEN
|
- `npm run test:uat` **15/15 GREEN** (A0-A14, includes inverted A14 post-charter-reversal)
|
||||||
- tsc clean
|
- tsc clean; `npm run build` clean
|
||||||
- npm run build exit 0
|
- Production bundle hook-free (Tier-1 grep gate, 10 forbidden strings)
|
||||||
- Working tree has 5 uncommitted: STATE.md (auto-modified), 3 icon placeholders, tests/fixtures/last_30sec.webm (probably needs revert — verify against HEAD)
|
- HEAD: `c60b887` (pause WIP commit)
|
||||||
|
- Branch: `gsd/phase-01-stabilize-video-pipeline`
|
||||||
|
|
||||||
## Plan 01-10
|
Working tree at pause:
|
||||||
|
- `M .gitignore` — adds `dist-archives/` ignore entry (from distribution-zip work); commit as `chore: gitignore dist-archives` in next session OR fold into next docs commit
|
||||||
|
|
||||||
Pending. Wave 3. depends_on: [01-09]. PLAN.md exists at `.planning/phases/01-stabilize-video-pipeline/01-10-PLAN.md`. Unblocked once 01-09 closes.
|
Distribution artifact available:
|
||||||
|
- `dist-archives/mokosh-build-2026-05-19-285e46f.zip` (154 KB) + `dist-archives/INSTALL.md`
|
||||||
|
- SHA256: `e05ff3dff807a3c74cea6ac821d433c24de2e209803237413d12accbb3986ae0`
|
||||||
|
- Gitignored; not in repo history
|
||||||
|
|
||||||
## Next-session order of operations
|
---
|
||||||
|
|
||||||
1. **`/gsd-resume-work`** to load HANDOFF.json.
|
## Next-Session Order of Operations
|
||||||
2. **Verify uncommitted files state:** `git diff tests/fixtures/last_30sec.webm` — if it differs from HEAD (which it probably does because operator's smoke regenerated it), revert: `git checkout HEAD -- tests/fixtures/last_30sec.webm`. The Plan 01-08 fixture committed at e40949d is the canonical one.
|
|
||||||
3. **Commit icon placeholders** (Bug A unblock):
|
|
||||||
```bash
|
|
||||||
git add icons/icon{16,48,128}.png
|
|
||||||
git commit -m "fix(01-09): Bug A — auto-generated icon placeholders unblock notification API"
|
|
||||||
```
|
|
||||||
4. **Spawn fresh /gsd-debug session for Bug B** with explicit anti-context-anxiety directive in the prompt. Use this prompt skeleton:
|
|
||||||
- slug: `01-09-recovery-flow`
|
|
||||||
- Bug B specifics: route src/background/index.ts:725-744 RECORDING_ERROR handler on `message.error` code — `'user-stopped-sharing'` → `setIdleMode()`; other codes → `setErrorMode()` (preserved).
|
|
||||||
- All 3 hypotheses already empirically verified (per prior session manager's checkpoint return); fresh session can skip verification phase and go straight to RED test + GREEN fix.
|
|
||||||
- RED test belongs in `tests/background/badge-state-machine.test.ts` (extend with routed-error-code case).
|
|
||||||
5. **Pre-checkpoint gates** (per saved memory) BEFORE re-surfacing operator UAT.
|
|
||||||
6. **Operator UAT re-run** to confirm Bug A + Bug B fixed.
|
|
||||||
7. **Wave 3: `/gsd-execute-phase 1`** continues to Plan 01-10.
|
|
||||||
8. **`/gsd-verify-work 1`** goal-backward.
|
|
||||||
9. **Phase 1 closure markers flip:** REQUIREMENTS.md [ ] → [x], ROADMAP [ ] → [x], STATE.md phase_reopened → phase_complete.
|
|
||||||
|
|
||||||
## Required reading (in order)
|
1. **`/gsd-resume-work`** to load this `.continue-here.md` + `.planning/HANDOFF.json`
|
||||||
|
2. **Acknowledge the BLOCKING CONSTRAINTS above** (saved-memory pointers)
|
||||||
|
3. **Spawn install-flow researcher** (the 529-blocked work; foreground; brief at §"Pending Researcher Brief" below). API should be healthier; if 529 recurs, monitor `status.claude.com` + retry.
|
||||||
|
4. **AFTER researcher returns:** revise Plan 01-10 (welcome tab CTA may flip from informational to actionable per Ask 1) + possibly amend Plan 01-09 (auto-select picker permissions per Ask 2)
|
||||||
|
5. **Spawn Plan 01-12 executor** (Design Integration; 7 waves; ~6-10h subagent budget). Wave-by-wave fresh-context spawns recommended.
|
||||||
|
6. **Spawn Plan 01-10 executor** (welcome tab; 4 autonomous tasks + 1 operator checkpoint; ~3-4h)
|
||||||
|
7. **Both 01-10 + 01-12 can parallel** — different surfaces, only manifest.json conflict (different keys). Sequential safer if uncertain.
|
||||||
|
8. **Operator empirical UAT** — fresh build + Load Unpacked + verify welcome tab + branded tokens + Russian copy + Loom mark icon + manifest:name renders correctly
|
||||||
|
9. **Flip Phase 1 closure markers:** REQUIREMENTS.md, ROADMAP.md (also backfill 01-08..01-13 entries per Plan 01-13 plan-checker flag #4), STATE.md
|
||||||
|
10. **Phase 2 kickoff** (Stabilize DOM + event-capture privacy)
|
||||||
|
|
||||||
1. `.planning/HANDOFF.json` — structured state
|
---
|
||||||
2. `.planning/intel/design-system.md` + `.planning/intel/assets-spec.md` — design specs for designer team
|
|
||||||
3. `src/background/index.ts` lines 54 (NOTIFICATION_ICON_PATH), 85-108 (state machine), 725-744 (RECORDING_ERROR handler — fix target), 833-840 (startup notification)
|
|
||||||
4. `src/offscreen/recorder.ts` lines 451-480 (onUserStoppedSharing — confirms resetBuffer happens)
|
|
||||||
5. `.planning/phases/01-stabilize-video-pipeline/01-09-PLAN.md` — full Plan 01-09 spec
|
|
||||||
6. `tests/background/badge-state-machine.test.ts` — RED test target for Bug B
|
|
||||||
|
|
||||||
## Infrastructure state
|
## Required Reading (in this order)
|
||||||
|
|
||||||
- Branch: `gsd/phase-01-stabilize-video-pipeline`, currently at `949aa03` (head)
|
1. `.planning/HANDOFF.json` — structured state (this file's machine-readable sibling)
|
||||||
- vite.config.ts has Buffer polyfill + ebml alias (Plan 01-08 critical fixes; do not touch)
|
2. `.planning/STATE.md` — current phase progress
|
||||||
- smoke.sh has timer overlay (commit 923aaca) AND SHARE_TARGET="Entire screen" (Plan 01-09); preserve both
|
3. `.planning/phases/01-stabilize-video-pipeline/01-13-SUMMARY.md` — Plan 01-13 full narrative including save-stops cycle
|
||||||
- manifest.json has `notifications` permission (Plan 01-09)
|
4. `.planning/phases/01-stabilize-video-pipeline/01-11-SUMMARY.md` — spike-pivot architectural learnings (NEVER `await import()` in SW; track.dispatchEvent('ended') not stop(); `__MOKOSH_UAT__` token)
|
||||||
- Tier-1 SW-bundle-import gate is the automation contract for ALL future bundle-touching changes
|
5. `.planning/intel/brand-decisions-v1.md` — 9 brand decisions resolved
|
||||||
|
6. `.planning/intel/brand-decisions-v1-followup-display-font.md` — R2 Lora reply context
|
||||||
|
7. `.planning/phases/01-stabilize-video-pipeline/01-10-PLAN.md` (commit 3a530c2) — welcome tab plan (design-swap-in-ready)
|
||||||
|
8. `.planning/phases/01-stabilize-video-pipeline/01-12-PLAN.md` (commit 8d1c8fb) — Design Integration plan (R2 Lora baked in)
|
||||||
|
9. `.planning/phases/01-stabilize-video-pipeline/01-09-PLAN.md` Amendments 2 + 3 — closure-via-harness + save-stops reversal charter
|
||||||
|
10. Auto-memory at `/home/parf/.claude/projects/-home-parf-projects-work-repremium/memory/MEMORY.md` — feedback-* files are the saved constraints above
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Pending Researcher Brief
|
||||||
|
|
||||||
|
Spawn `gsd-phase-researcher` foreground.
|
||||||
|
|
||||||
|
**Subject:** Install-flow UX upgrade — research install-time auto-start + auto-select desktop under "minimum friction everywhere" policy.
|
||||||
|
|
||||||
|
**Two asks to research:**
|
||||||
|
|
||||||
|
### Ask 1: Start recording at install-time
|
||||||
|
|
||||||
|
Operator expectation: install extension → recording active. Zero clicks ideal.
|
||||||
|
|
||||||
|
Orchestrator hypothesis (verify or refute empirically):
|
||||||
|
- `getDisplayMedia` REQUIRES user gesture per W3C Screen Capture spec
|
||||||
|
- `chrome.runtime.onInstalled` callback fires without activation → cannot call getDisplayMedia
|
||||||
|
- Achievable max: install → welcome tab opens (zero clicks) → operator clicks SINGLE "Start Mokosh" button → recording starts
|
||||||
|
- Enterprise-policy escape may exist (`ScreenCaptureWithoutGestureAllowedForOrigins`?) for managed deployments
|
||||||
|
|
||||||
|
### Ask 2: Auto-select desktop (skip picker)
|
||||||
|
|
||||||
|
Operator expectation: no picker dialog; just record what user is looking at.
|
||||||
|
|
||||||
|
Orchestrator hypothesis (verify or refute empirically):
|
||||||
|
- Picker is consent gate; Chrome WILL NOT let extensions auto-pick a screen
|
||||||
|
- Achievable max: reduce picker friction (displaySurface monitor constraint, chrome.desktopCapture.chooseDesktopMedia(["screen"]), Chrome launch flag `--auto-select-desktop-capture-source` for managed deployments)
|
||||||
|
- No JS-callable auto-accept exists for unmanaged Chrome
|
||||||
|
|
||||||
|
**Research areas (12; cite sources + run probes empirically):**
|
||||||
|
|
||||||
|
1. getDisplayMedia gesture requirement empirical (W3C spec + Chromium source if findable)
|
||||||
|
2. Enterprise policy reality (ScreenCaptureWithoutGestureAllowedForOrigins — real in 2026? syntax? deployment?)
|
||||||
|
3. Welcome-tab Start-button gesture chain (does activation propagate through chrome.runtime.sendMessage?)
|
||||||
|
4. chrome.desktopCapture.chooseDesktopMedia auto-accept behavior (single-monitor vs multi-monitor)
|
||||||
|
5. Chrome 2024-2026 screen-capture API additions (getCurrentBrowsingContextMedia, Capture Handle, others?)
|
||||||
|
6. Single-monitor auto-accept empirical test (which API auto-accepts on dev machine?)
|
||||||
|
7. Industry prior art (Loom for Chrome, Awesome Screenshot, Screencastify, Vimeo Record, Veed.io)
|
||||||
|
8. Permission combinations + manifest implications (desktopCapture, tabs, activeTab)
|
||||||
|
9. Welcome tab + onStartup notification interplay (combined first-install + restart flow)
|
||||||
|
10. Privacy / consent UX considerations
|
||||||
|
11. Synthesized minimum-friction user journey (concrete ASCII flow)
|
||||||
|
12. Edge cases (macOS screen-recording permission, Linux Wayland vs X11, incognito, managed Chrome)
|
||||||
|
|
||||||
|
**Output:** `.planning/phases/01-stabilize-video-pipeline/01-10-RESEARCH.md`.
|
||||||
|
|
||||||
|
**Constraints:** foreground spawn; anti-context-anxiety (no AskUserQuestion; commit `wip(01-10-research):` on context exhaustion); cite sources; be honest about IMPOSSIBLE constraints (don't suggest workarounds that don't exist).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Infrastructure State
|
||||||
|
|
||||||
|
- Branch: `gsd/phase-01-stabilize-video-pipeline` at HEAD `c60b887` (pause WIP)
|
||||||
|
- `vite.config.ts` + `vite.test.config.ts` both work; two-bundle separation operational (`npm run build` → `dist/` hook-free; `npm run build:test` → `dist-test/` test-instrumented)
|
||||||
|
- `npm run test:uat` operational (15/15 GREEN; ~75s wall-clock for full harness; A11 35s buffer wait dominates)
|
||||||
|
- Tier-1 grep gate at `tests/background/no-test-hooks-in-prod-bundle.test.ts` enforces 10 forbidden hook strings absent from production dist/
|
||||||
|
- `smoke.sh` operational for operator-driven empirical (HEADLESS=0 + real screen-share)
|
||||||
|
- ffprobe at `/usr/bin/ffprobe` (UAT harness A12 + smoke acceptance gate)
|
||||||
|
- `dist-archives/` (gitignored) contains tester-install zip + INSTALL.md
|
||||||
|
|
||||||
|
## API Capacity Note
|
||||||
|
|
||||||
|
Anthropic API hit 529 Overloaded twice during this session's afternoon (during researcher spawn for install-flow + auto-select). User is monitoring `status.claude.com`. Reversal-debug spawn DID work after API recovered. Next session: try researcher first; if 529 recurs, defer to later or use ScheduleWakeup with 30-60min delay.
|
||||||
|
|
||||||
|
## Followup Backlog (not blocking; capture for future)
|
||||||
|
|
||||||
|
- ROADMAP.md gap: Plans 01-08..01-13 missing entries (Plan 01-13 plan-checker flag #4)
|
||||||
|
- `tabs` permission gap: harness A2 thinning workaround per 01-11-SUMMARY; production would benefit from adding `tabs` permission
|
||||||
|
- A12 full ffprobe coverage: synthetic-stream produces frameless WebM in headless; HEADLESS=0 with real screen-share is the escape hatch
|
||||||
|
- IBM Plex Sans + Mono self-hosting: Plan 01-12 currently leaves them as system fallback; Plan 5 hardening could bundle them
|
||||||
|
|||||||
Reference in New Issue
Block a user