forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
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/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 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
newFilesexist on disk - All
criticalCodestrings found in source via grep - Runs each feature's
testsvia 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
-
bun test .fork-features/verify.tspasses against current dev (baseline) - All 3 features verified: async-tasks, rg-tool, 1m-context
-
/sync-upstreamcommand loads in opencode - Report template produces valid markdown
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels