Parent Epic
Part of #158 (Fork Realignment)
Objective
Create the .fork-features/ directory with manifest, verification tests, sync command, and report system — BEFORE merging any feature branches. This becomes the governance layer for all future upstream syncs.
Deliverables
1. .fork-features/manifest.json — Feature Registry
Declares all fork-specific features with:
status: active / upstream-absorbed / dropped
newFiles / modifiedFiles: File inventory per feature
criticalCode: Strings that MUST exist post-merge (grep gate)
tests: Feature-specific test paths to run
upstreamTracking.absorptionSignals: Patterns to detect when upstream absorbs our feature
upstreamTracking.relatedPRs/Issues: Links for context
Features declared: async-tasks, rg-tool, 1m-context
2. .fork-features/verify.ts — Standalone Verification Test
Standalone bun test (no preload dependency). Checks:
- All
newFiles exist on disk
- All
criticalCode strings found in source via grep
- Runs each feature's
tests via subprocess
- Scans upstream for
absorptionSignals — if triggered, auto-pause and ask user which version to keep
- Runs full typecheck
3. .opencode/command/sync-upstream.md — AI-Executable Sync Command
Custom slash command that:
- Pre-injects: upstream gap, manifest, last 3 sync reports
- Instructs agent to: create sync branch → merge → resolve conflicts → run verify.ts → write report
- On absorption signal: STOP and present diff to user for decision
- Requires agent to write dated report to
.fork-features/reports/
- Tells agent to read last 3 reports before starting (institutional memory)
4. .fork-features/README.md — Human Documentation
Explains the system, how to add/drop features, how reports work.
5. .fork-features/reports/ — Sync Run History
Directory for dated markdown reports. Each run records:
- What was merged (upstream commit range)
- Conflicts and resolutions
- Feature verification results
- Absorption signal alerts
- Decisions made, pain points, recommendations
Quality Gates
Sequencing
This issue MUST complete before merging ws1/ws3/ws4 branches.
After this, Phase 2 merges feature branches under governance of verify.ts.
Technical Notes
- verify.ts is standalone — no dependency on
test/preload.ts
- manifest.json lives at
.fork-features/manifest.json (NOT in .opencode/)
- Absorption detection: auto-pause + ask user (never silently override)
- CI: add
bun test .fork-features/ step to .github/workflows/ci.yml
Parent Epic
Part of #158 (Fork Realignment)
Objective
Create the
.fork-features/directory with manifest, verification tests, sync command, and report system — BEFORE merging any feature branches. This becomes the governance layer for all future upstream syncs.Deliverables
1.
.fork-features/manifest.json— Feature RegistryDeclares all fork-specific features with:
status:active/upstream-absorbed/droppednewFiles/modifiedFiles: File inventory per featurecriticalCode: Strings that MUST exist post-merge (grep gate)tests: Feature-specific test paths to runupstreamTracking.absorptionSignals: Patterns to detect when upstream absorbs our featureupstreamTracking.relatedPRs/Issues: Links for contextFeatures declared:
async-tasks,rg-tool,1m-context2.
.fork-features/verify.ts— Standalone Verification TestStandalone
bun test(no preload dependency). Checks:newFilesexist on diskcriticalCodestrings found in source via greptestsvia subprocessabsorptionSignals— if triggered, auto-pause and ask user which version to keep3.
.opencode/command/sync-upstream.md— AI-Executable Sync CommandCustom slash command that:
.fork-features/reports/4.
.fork-features/README.md— Human DocumentationExplains the system, how to add/drop features, how reports work.
5.
.fork-features/reports/— Sync Run HistoryDirectory for dated markdown reports. Each run records:
Quality Gates
bun test .fork-features/verify.tspasses against current dev (baseline)/sync-upstreamcommand loads in opencodeSequencing
This issue MUST complete before merging ws1/ws3/ws4 branches.
After this, Phase 2 merges feature branches under governance of verify.ts.
Technical Notes
test/preload.ts.fork-features/manifest.json(NOT in.opencode/)bun test .fork-features/step to.github/workflows/ci.yml