一键导入
openspec-schema-version-collision
How to truth-repair an OpenSpec change when its schema target collides with the live repo
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
How to truth-repair an OpenSpec change when its schema target collides with the live repo
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | openspec-schema-version-collision |
| description | How to truth-repair an OpenSpec change when its schema target collides with the live repo |
| domain | openspec, architecture, execution planning |
| confidence | high |
| source | earned |
Use this when an OpenSpec proposal/design/spec/tasks package describes a schema bump or DDL surface that no longer matches the live repository. Typical symptoms: the target schema version is already shipped, the artifacts still refer to an old rejection boundary, or task DDL uses a logical field name that does not match the physical column name in src/schema.sql.
Before assigning any implementation slice, read both:
src/core/db.rs for SCHEMA_VERSIONsrc/schema.sql for the labeled schema version and the actual column/index namesIf either already reflects the version the change claims it will introduce, the artifacts are stale and must be corrected before implementation continues.
When the target version is wrong, correct the full OpenSpec set together:
proposal.mddesign.mdtasks.mdspecs/**/spec.mdDo not fix only tasks.md. The proposal, migration plan, and acceptance scenarios all need the same version boundary or reviewers will sign off against conflicting truths.
OpenSpec often speaks in product terms (kind, session, status) while SQLite may use older physical column names (type, legacy config keys, etc.). Before routing the first schema slice, confirm every indexed column name exists exactly as written in the live schema. If not, either:
Never let the first implementation slice discover this by failing at DDL apply time.
If partial implementation has already started, stop widening the branch until the artifacts are repaired. Checked tasks against stale version numbers or nonexistent columns create false progress and make later reviewer gating unreliable.
If the first schema slice is already checked and present in the repo, rewrite those tasks so they describe the landed baseline truthfully:
Add / Bump to Keep / Align / Verifypages.type, guarded expressions, current schema version)This preserves checkbox history while removing the false claim that the repo still needs a fresh schema bump.
Once the artifacts are corrected:
Resolve knowledge gaps: fetch unresolved gaps, assess sensitivity, generate research queries, ingest findings, and close gaps with a resolution slug.
Interrupt-driven alerts: detect and surface new contradictions, stale pages, resolved gaps, and embedding drift. Priority-classified with deduplication.
Ingest meeting notes, articles, documents, and conversations into Quaid. Handles idempotent ingestion for exact-byte duplicates and vault-backed sync.
Keep the brain healthy: detect and resolve contradictions via the correction / supersede workflow, validate referential integrity, triage knowledge gaps, find orphaned pages, and compact the database.
Answer questions from the brain using FTS5 + semantic search + structured queries. Synthesize across multiple pages. Cite sources.
Agent-guided binary upgrades: version check, channel detection, download via install.sh (or manual asset fetch + SHA-256 verify), and post-upgrade validation.