v1.7.1 — stage migrations in the feature folder, promote at implement#2
Merged
Merged
Conversation
…mplement
data-model wrote shippable .up.sql/.down.sql straight into the LIVE migrations/
tree during the design stage — four steps before implement. A stray `migrate up`
(CI, a teammate's loop, a deploy) could then apply a half-designed schema to a real
DB, and the global sequence number was grabbed early, colliding with other in-flight
features. Both are removed by staging.
- data-model now writes the pair under docs/features/<slug>/migrations/<NN>_*.{up,down}.sql
(feature-local ordinal); it detects the repo's convention but does NOT pick the global
number or touch the live tree. Mirrors the existing _drift/ staging discipline.
- implement's layer:migration task PROMOTES each staged file into the live migrations/
(next free number / fresh timestamp, in ordinal order), copies the SQL verbatim, then
applies + reverts it; the feature's integration tests run against the promoted schema.
Number assigned at promote-time → no early-grab collisions across concurrent features.
- tasks: a migration task's files_hint is the staged path; DoD = promoted, then applies/reverts.
- Updated: data-model SKILL + migrations-baseline template, implement SKILL + inputs/team-exec/
workflow-exec, tasks SKILL + task template, README flow rows.
validate_plugin.py: 177 checks PASS; markdown link sweep clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
data-model(backbone step 5) wrote shippable.up.sql/.down.sqlstraight into the livemigrations/tree during the design stage — four steps beforeimplement. A straymigrate up(CI, a teammate's loop, a deploy) could apply a half-designed schema to a real DB, and the global sequence number was grabbed early, colliding with other in-flight features.Fix — stage, then promote at build time
data-modelstages the pair underdocs/features/<slug>/migrations/<NN>_*.{up,down}.sql(feature-local ordinal). It detects the repo's convention but does not pick the global number or touch the live tree. (Mirrors the existing_drift/staging discipline.)implement'slayer: migrationtask promotes each staged file into the livemigrations/— next free number / fresh timestamp, in ordinal order, SQL copied verbatim — then applies + reverts it. Integration tests run against the promoted schema. The number is assigned at promote-time → no early-grab collisions across concurrent features.tasks— a migration task'sfiles_hintis the staged path; DoD = «promoted, then applies/reverts cleanly».Touched
data-model/SKILL.md+migrations-baseline.md;implement/SKILL.md+inputs.md/team-exec.md/workflow-exec.md;tasks/SKILL.md+task.md;README.md; manifests → v1.7.1.Seed fixtures («NOT in
migrations/») and the greenfield scaffold (which legitimately creates the livemigrations/infra) are unaffected.Verification
validate_plugin.py: 177 checks PASS (manifests agree on 1.7.1); markdown link sweep clean.🤖 Generated with Claude Code