[Debt] Backfill OpenSpec delta-format stubs (x57) / 回填 OpenSpec 存量 Stub

Author: xxk8Created Jul 7, 2026Updated Jul 7, 2026

Summary

We need to backfill the 57 existing OpenSpec spec.md files that were migrated to the delta-format using stubbed Requirement / Scenario placeholders. These are not real specs — they are pending backfill.

Count discrepancy note. Earlier estimates said "32 stubs", but the actual delta-format migration captured 57 spec.md files (including script-studio (3), platform-value-upgrade-2026-q3 (10), public-inbox-monetization (7), migrate-sqlite-to-postgresql-19 (4), etc.). A CI gate (openspec-stub-gate in .github/workflows/ci.yml) is now in place to freeze the stub count at 57 and ratchet it down to 0 as backfills land.

Scope

The full 57-path list (ordered by priority) lives in openspec/INDEX.md §6 "待回填的规格债务 (Backfill Debt)".

Priority Tiers

Tier 1 — High-Traffic Capabilities (do these first) (6 specs)

  • add-web-visualization-shell → web-shell
  • admin-dashboard-social-login → admin-dashboard
  • admin-dashboard-social-login → social-login
  • platform-value-upgrade-2026-q3 → publish-wizard
  • platform-value-upgrade-2026-q3 → license-system
  • platform-value-upgrade-2026-q3 → content-preview

Tier 2 — Core Platform / Infrastructure (24 specs)

  • platform-value-upgrade-2026-q3 remaining 7 (analytics-dashboard · api-reliability · draft-templates · frontend-polish · multi-turn-chat · scheduled-timeline · usage-metering)
  • migrate-sqlite-to-postgresql-19 4 (db-pool-observability · pg-database-driver · pg-schema-v19 · sqlite-pg-migrator)
  • web-shell-polish-2026-q3 3 · cli-and-uploader-refactor 2 · cli-uploader-architecture-consistency 1
  • public-inbox-monetization 7 (affiliate-rail · ethical-ads-sponsor-slot · guest-usage-tracking · public-inbox-api · public-inbox-ops-runbook · public-inbox-page · public-inbox-quota)

Tier 3 — Feature Backlog (20 specs)

  • youtube-full-integration 5 · account-health-monitoring 4 · task-sse-streaming 3 · script-studio 3 · inbox-multi-platform 4 · add-web-inbox 1

Tier 4 — Cleanups & Niche (7 specs)

  • ai-sidebar-bottom-panel 3 · audit-account-groups-unique-collision-2026q3 · drop-legacy-failing-tests-2026q3 · fix-baijiahao-schedule-time · phase5-uploader-migration-tail

How to Backfill (per spec)

  1. Pick a spec.md from the priority tier above.
  2. Rewrite the ### Requirement: <name> (openspec delta-format stub ...) heading + its #### Scenario: ... (stub) block(s) into real delta-format contracts. Reference implementation: openspec/changes/studio-whiteboard/specs/canvas-editor/spec.md (7 Requirements + 24 Scenarios, the new canonical format).
  3. Synchronously decrement docs/openspec-stub-baseline.txt by the number of stubs removed. The CI gate forces this: when CURRENT_COUNT < BASELINE_COUNT it fails with a "RATCHET REQUIRED" message telling you to update the baseline file in the same PR.
  4. PR title convention: backfill(openspec): <capability> — remove N stubs.

CI Gate Behavior (.github/workflows/ci.yml::openspec-stub-gate)

  • ✅ CURRENT_COUNT == BASELINE_COUNT → pass (no drift)
  • ❌ CURRENT_COUNT > BASELINE_COUNT → fail ("net-new stub added; do not add new stubs")
  • ⚠️ CURRENT_COUNT < BASELINE_COUNT → fail with explicit instruction to update the baseline file (ratchet requires human confirmation in the same PR)
  • Baseline file: docs/openspec-stub-baseline.txt (currently 57, will be decremented per backfill PR)

Acceptance Criteria

  • All 6 Tier-1 specs backfilled by end of Q3 2026
  • docs/openspec-stub-baseline.txt reads 0
  • No openspec delta-format stub marker remains in openspec/changes/*/specs/
  • openspec validate --changes still reports 31/0 (or higher, as more changes land)

Cross-references

  • openspec/INDEX.md §6 — backfill tracker with full 57-path list
  • openspec/changes/studio-whiteboard/specs/canvas-editor/spec.md — reference for the canonical delta-format shape
  • openspec/changes/email-auth-login/specs/email-auth/spec.md — secondary reference (older clean delta format)
  • .github/workflows/ci.yml::openspec-stub-gate — the ratchet job
  • docs/openspec-stub-baseline.txt — the ratchet baseline

Source: dreammis/social-auto-upload