@tekyzinc/gsd-t 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,6 +6,7 @@ A methodology for reliable, parallelizable development using Claude Code with op
6
6
  **Enables parallel execution** — contract-driven domains can be worked on simultaneously.
7
7
  **Maintains test coverage** — automatically keeps tests aligned with code changes.
8
8
  **Catches downstream effects** — analyzes impact before changes break things.
9
+ **Protects existing work** — destructive action guard prevents schema drops, architecture replacements, and data loss without explicit approval.
9
10
 
10
11
  ---
11
12
 
@@ -141,6 +141,33 @@ If `README.md` exists, update it to reflect the completed milestone:
141
141
 
142
142
  If `README.md` doesn't exist, create one with project name, description, version, tech stack, setup instructions, and link to `docs/`.
143
143
 
144
+ ## Step 7.5: Document Ripple
145
+
146
+ Before creating the git tag, verify all documentation is up to date:
147
+
148
+ ### Always update:
149
+ 1. **`.gsd-t/progress.md`** — Already updated in Step 6, verify it's complete with version and milestone state
150
+ 2. **`README.md`** — Already updated in Step 7, verify it reflects all delivered capabilities
151
+
152
+ ### Check if affected:
153
+ 3. **`docs/requirements.md`** — Verify all requirements delivered in this milestone are marked as complete
154
+ 4. **`docs/architecture.md`** — Verify the architecture doc matches the current system state after all milestone work
155
+ 5. **`docs/workflows.md`** — Verify any workflows added or changed during the milestone are documented
156
+ 6. **`docs/infrastructure.md`** — If infrastructure changed during the milestone (new services, new deployment steps), verify it's documented
157
+ 7. **`CLAUDE.md`** — Verify any conventions established during the milestone are captured
158
+ 8. **`.gsd-t/techdebt.md`** — Verify any debt resolved during the milestone is marked done, and any new debt discovered is logged
159
+
160
+ ### This is the LAST GATE before tagging — nothing should be undocumented.
161
+
162
+ ## Step 7.6: Test Verification
163
+
164
+ Before creating the git tag, verify the milestone is truly complete:
165
+
166
+ 1. **Run the full test suite**: Execute ALL tests — unit, integration, and E2E if available
167
+ 2. **Verify all pass**: Every test must pass. If any fail, fix before tagging (up to 2 attempts)
168
+ 3. **Compare to baseline**: If a test baseline was recorded at milestone start, verify coverage has improved or at minimum not regressed
169
+ 4. **Log test results**: Include test pass/fail counts in the milestone summary (Step 4)
170
+
144
171
  ## Step 8: Create Git Tag
145
172
 
146
173
  ```bash
@@ -47,8 +47,9 @@ The contract didn't specify something it should have. Symptoms:
47
47
  2. Trace through the relevant domain(s)
48
48
  3. Check contract compliance at each boundary
49
49
  4. Identify root cause
50
- 5. Fix and test
51
- 6. Update contracts if needed
50
+ 5. **Destructive Action Guard**: If the fix requires destructive or structural changes (dropping tables, removing columns, changing schema, replacing architecture patterns, removing working modules) → STOP and present the change to the user with what exists, what will change, what will break, and a safe migration path. Wait for explicit approval.
51
+ 6. Fix and test — **adapt the fix to existing structures**, not the other way around
52
+ 7. Update contracts if needed
52
53
 
53
54
  ### Team Mode (for complex cross-domain bugs)
54
55
  ```
@@ -83,6 +84,16 @@ After fixing, assess what documentation was affected by the change and update AL
83
84
 
84
85
  ### Skip what's not affected — don't update docs for the sake of updating them.
85
86
 
87
+ ## Step 5: Test Verification
88
+
89
+ Before committing, ensure the fix is solid:
90
+
91
+ 1. **Update tests**: If the bug reveals a missing test case, add one that would have caught it
92
+ 2. **Run affected tests**: Execute all tests related to the changed files and domain
93
+ 3. **Verify passing**: All tests must pass. If any fail, fix before proceeding (up to 2 attempts)
94
+ 4. **Run E2E tests**: If the fix changed UI, routes, or user flows and an E2E framework exists, run affected specs
95
+ 5. **Regression check**: Confirm the fix doesn't break any adjacent functionality
96
+
86
97
  Commit: `[debug] Fix {description} — root cause: {explanation}`
87
98
 
88
99
  $ARGUMENTS
@@ -97,6 +97,14 @@ Decisions don't just affect contracts — they can change the broader documentat
97
97
 
98
98
  ### Skip what's not affected.
99
99
 
100
+ ## Step 5.5: Test Verification
101
+
102
+ If decisions resulted in contract or code changes:
103
+
104
+ 1. **Run affected tests**: Execute tests related to any files modified by contract updates
105
+ 2. **Verify passing**: All tests must pass. If any fail from contract changes, fix before proceeding (up to 2 attempts)
106
+ 3. **Flag test gaps**: If decisions created new requirements with no test coverage, note them for the plan phase
107
+
100
108
  ## Step 6: Validate Contracts
101
109
 
102
110
  After all updates:
@@ -28,7 +28,8 @@ For each task:
28
28
  1. Read the task description, files list, and contract refs
29
29
  2. Read the relevant contract(s) — implement EXACTLY what they specify
30
30
  3. Read the domain's constraints.md — follow all patterns
31
- 4. Implement the task
31
+ 4. **Destructive Action Guard**: Before implementing, check if the task involves any destructive or structural changes (DROP TABLE, schema changes that lose data, removing existing modules, replacing architecture patterns). If YES → STOP and present the change to the user with what exists, what will change, what will break, and a safe migration path. Wait for explicit approval before proceeding.
32
+ 5. Implement the task
32
33
  5. Verify acceptance criteria are met
33
34
  6. Run affected unit tests — fix any failures before proceeding
34
35
  7. If E2E framework exists and task changed UI/routes/flows: run affected E2E specs, update specs if needed
@@ -51,6 +52,7 @@ ALL TEAMMATES must read before starting:
51
52
  5. Your domain's tasks.md — your work
52
53
 
53
54
  RULES FOR ALL TEAMMATES:
55
+ - **Destructive Action Guard**: NEVER drop tables, remove columns, delete data, replace architecture patterns, or remove working modules without messaging the lead first. The lead must get user approval before any destructive action proceeds.
54
56
  - Only modify files listed in your domain's scope.md
55
57
  - Implement interfaces EXACTLY as specified in contracts
56
58
  - If a task is marked BLOCKED, message the lead and wait
@@ -189,7 +189,32 @@ Update `.gsd-t/progress.md`:
189
189
  - Log the feature addition in Decision Log
190
190
  - Note any contract changes that will be needed
191
191
 
192
- ## Step 7: Report to User
192
+ ## Step 7: Document Ripple
193
+
194
+ After creating the feature roadmap and milestones, update all affected documentation:
195
+
196
+ ### Always update:
197
+ 1. **`.gsd-t/progress.md`** — Already done in Step 6, but verify Decision Log includes the feature addition with rationale
198
+
199
+ ### Check if affected:
200
+ 2. **`docs/requirements.md`** — Add new functional/technical requirements identified during feature analysis
201
+ 3. **`docs/architecture.md`** — If the feature introduces new components, data flows, or architectural patterns, document them
202
+ 4. **`docs/workflows.md`** — If the feature introduces new user journeys or modifies existing flows, update them
203
+ 5. **`CLAUDE.md`** — If the feature establishes new conventions or patterns that future work should follow, add them
204
+ 6. **`.gsd-t/contracts/`** — If impact analysis identified contract changes needed, note them (actual updates happen during partition)
205
+ 7. **`.gsd-t/techdebt.md`** — If analysis revealed existing debt that interacts with this feature, add or update items
206
+
207
+ ### Skip what's not affected.
208
+
209
+ ## Step 7.5: Test Verification
210
+
211
+ Before finalizing the feature plan:
212
+
213
+ 1. **Run existing tests**: Execute the full test suite to confirm the codebase is in a clean state before feature work begins
214
+ 2. **Verify passing**: If any tests fail, flag them — they must be fixed before or during the first milestone
215
+ 3. **Note test gaps**: From the impact analysis, identify which existing tests will need updates and which new tests will be needed — include these in milestone scope
216
+
217
+ ## Step 8: Report to User
193
218
 
194
219
  Present:
195
220
  1. Impact analysis summary (what's new vs. what's modified)
@@ -178,6 +178,29 @@ If breaking changes require pre-work, add to domain tasks:
178
178
  - [ ] IMP-002: {remediation task}
179
179
  ```
180
180
 
181
+ ## Step 6.5: Document Ripple
182
+
183
+ After producing the impact report, update affected documentation:
184
+
185
+ ### Always update:
186
+ 1. **`.gsd-t/progress.md`** — Log the impact analysis in the Decision Log with date and key findings
187
+
188
+ ### Check if affected:
189
+ 2. **`docs/architecture.md`** — If the analysis revealed architectural concerns or proposed changes, document them
190
+ 3. **`docs/requirements.md`** — If the analysis found requirements that would be affected by the planned changes, note the impact
191
+ 4. **`.gsd-t/contracts/`** — If contract violations or needed updates were found, flag them clearly in the contracts (mark as "PENDING UPDATE")
192
+ 5. **`.gsd-t/techdebt.md`** — If the analysis uncovered new debt or risk areas, add them
193
+
194
+ ### Skip what's not affected.
195
+
196
+ ## Step 6.6: Test Verification
197
+
198
+ Validate the test landscape before recommending proceed/block:
199
+
200
+ 1. **Run existing tests**: Execute the full test suite to establish current state
201
+ 2. **Verify passing**: Confirm what passes today — any pre-existing failures should be noted in the impact report
202
+ 3. **Map test impact**: For each planned change in Step 2, identify which tests will need updating — include this in the "Test Impact" section of the report
203
+
181
204
  ## Step 7: Decision Gate
182
205
 
183
206
  ### If PROCEED:
@@ -128,6 +128,30 @@ If there's existing source code:
128
128
  4. Add findings to CLAUDE.md
129
129
  5. Log in progress.md: "Existing codebase analyzed — {summary}"
130
130
 
131
+ ## Step 7.5: Document Ripple
132
+
133
+ After initialization, verify all created documentation is consistent:
134
+
135
+ ### Always update:
136
+ 1. **`.gsd-t/progress.md`** — Already created in Step 3, verify it's complete
137
+ 2. **`CLAUDE.md`** — Already handled in Step 4, verify GSD-T section is present and references all docs
138
+
139
+ ### Check if affected:
140
+ 3. **`docs/requirements.md`** — If existing code was scanned (Step 7), verify requirements doc reflects discovered functionality
141
+ 4. **`docs/architecture.md`** — If existing code was scanned, verify architecture doc reflects the actual system structure
142
+ 5. **`README.md`** — Already handled in Step 6, verify it links to docs/ and reflects project state
143
+
144
+ ### Skip what's not affected — init creates docs, so most ripple is about consistency verification.
145
+
146
+ ## Step 7.6: Test Verification
147
+
148
+ After initialization:
149
+
150
+ 1. **If existing code with tests**: Run the full test suite to establish a baseline. Document results in `.gsd-t/progress.md`
151
+ 2. **If existing code without tests**: Note the absence — recommend test setup as part of the first milestone
152
+ 3. **If greenfield**: No tests to run, but note that test infrastructure should be in Milestone 1
153
+ 4. **Verify init outputs**: Confirm all created files exist and are non-empty
154
+
131
155
  ## Step 8: Report
132
156
 
133
157
  Tell the user:
@@ -104,6 +104,16 @@ Integration is where the real system takes shape. Verify documentation matches r
104
104
 
105
105
  ### Skip what's not affected.
106
106
 
107
+ ## Step 5.5: Test Verification
108
+
109
+ After integration and doc ripple, verify everything works together:
110
+
111
+ 1. **Update tests**: Add or update integration tests for newly wired domain boundaries
112
+ 2. **Run all tests**: Execute the full test suite — integration often introduces cross-domain failures
113
+ 3. **Verify passing**: All tests must pass. If any fail, fix before proceeding (up to 2 attempts)
114
+ 4. **Run E2E tests**: If an E2E framework exists, run the full E2E suite — integration is where end-to-end flows break
115
+ 5. **Smoke test results**: Ensure the Step 4 smoke test results are still valid after any fixes
116
+
107
117
  ## Step 6: Handle Integration Issues
108
118
 
109
119
  For each issue found:
@@ -50,6 +50,29 @@ Before formal partitioning, do a quick assessment:
50
50
 
51
51
  Present the assessment and ask: "Ready to partition into domains now, or want to discuss first?"
52
52
 
53
+ ## Step 4.5: Document Ripple
54
+
55
+ After defining the milestone, update affected documentation:
56
+
57
+ ### Always update:
58
+ 1. **`.gsd-t/progress.md`** — Already updated in Step 2, but verify the Decision Log includes the milestone definition with rationale
59
+
60
+ ### Check if affected:
61
+ 2. **`docs/requirements.md`** — If the milestone scope implies new or changed requirements, add or update them
62
+ 3. **`docs/architecture.md`** — If the milestone will introduce new components or change system structure, note planned changes
63
+ 4. **`.gsd-t/roadmap.md`** — If it exists, add the new milestone in the proper sequence
64
+ 5. **`CLAUDE.md`** — If the milestone establishes new scope boundaries or conventions, add them
65
+
66
+ ### Skip what's not affected.
67
+
68
+ ## Step 4.6: Test Verification
69
+
70
+ Before proceeding to partition:
71
+
72
+ 1. **Run existing tests**: Execute the full test suite to confirm the codebase is clean before starting the milestone
73
+ 2. **Verify passing**: If any tests fail, flag them as pre-existing — they should be addressed as part of this milestone or logged as tech debt
74
+ 3. **Baseline**: Record test state so the milestone has a clear starting point for quality measurement
75
+
53
76
  ## Step 5: Auto-Partition (if user confirms)
54
77
 
55
78
  If the user wants to proceed immediately, execute the partition workflow (same as gsd-t-partition) for this milestone.
@@ -153,6 +153,28 @@ Write `.gsd-t/progress.md`:
153
153
  - {date}: {decision and rationale}
154
154
  ```
155
155
 
156
+ ## Step 4.5: Document Ripple
157
+
158
+ After creating domains and contracts, update affected documentation:
159
+
160
+ ### Always update:
161
+ 1. **`.gsd-t/progress.md`** — Already updated in Step 4, but verify Decision Log includes partition rationale
162
+
163
+ ### Check if affected:
164
+ 2. **`docs/architecture.md`** — If the partition defines new component boundaries or clarifies the system structure, update it
165
+ 3. **`docs/requirements.md`** — If partitioning revealed that requirements need clarification or splitting by domain, update them
166
+ 4. **`CLAUDE.md`** — If the partition establishes new file ownership conventions or domain-specific patterns, add them
167
+
168
+ ### Skip what's not affected.
169
+
170
+ ## Step 4.6: Test Verification
171
+
172
+ Before finalizing the partition:
173
+
174
+ 1. **Run existing tests**: Execute the full test suite to confirm codebase is clean before domain work begins
175
+ 2. **Verify passing**: If any tests fail, assign them to the appropriate domain as pre-existing issues
176
+ 3. **Map tests to domains**: Note which test files belong to which domain — this informs task planning
177
+
156
178
  ## Step 5: Validate
157
179
 
158
180
  Before finishing, verify:
@@ -95,6 +95,29 @@ Add to each domain's `tasks.md`:
95
95
  - Estimated checkpoints: {N}
96
96
  ```
97
97
 
98
+ ## Step 4.5: Document Ripple
99
+
100
+ After creating task lists and mapping dependencies, update affected documentation:
101
+
102
+ ### Always update:
103
+ 1. **`.gsd-t/progress.md`** — Updated in Step 5, but verify Decision Log includes planning decisions and rationale
104
+
105
+ ### Check if affected:
106
+ 2. **`docs/requirements.md`** — If planning revealed missing, ambiguous, or conflicting requirements, update them
107
+ 3. **`docs/architecture.md`** — If the task breakdown reveals new components or clarifies data flow, update it
108
+ 4. **`.gsd-t/contracts/`** — If planning revealed contract gaps or needed additional detail, update them
109
+ 5. **Domain `constraints.md`** — If planning revealed new constraints (task ordering, shared resources), add them
110
+
111
+ ### Skip what's not affected.
112
+
113
+ ## Step 4.6: Test Verification
114
+
115
+ Before finalizing the plan:
116
+
117
+ 1. **Run existing tests**: Execute the full test suite to confirm codebase state before execution begins
118
+ 2. **Verify passing**: Document any pre-existing failures — assign them to appropriate domain tasks
119
+ 3. **Include test tasks**: Ensure each domain's task list includes test creation/update tasks where acceptance criteria require verification
120
+
98
121
  ## Step 5: Update Progress
99
122
 
100
123
  Update `.gsd-t/progress.md`:
@@ -37,6 +37,31 @@ Scan this codebase and populate the GSD-T documentation. Analyze the actual code
37
37
 
38
38
  ---
39
39
 
40
+ ## Document Ripple
41
+
42
+ After populating all documentation, verify cross-references:
43
+
44
+ ### Always update:
45
+ 1. **`.gsd-t/progress.md`** — Set milestone and log the population session
46
+ 2. **`CLAUDE.md`** — If it exists, verify it references all populated docs. If conventions were discovered during population, add them
47
+
48
+ ### Check if affected:
49
+ 3. **`.gsd-t/contracts/`** — If API or schema contracts exist, verify they match what was documented in architecture/requirements
50
+ 4. **`.gsd-t/techdebt.md`** — If population revealed inconsistencies, missing tests, or debt, log items
51
+ 5. **`README.md`** — If it exists, verify it's consistent with the populated docs. If not, update it
52
+
53
+ ### Skip what's not affected.
54
+
55
+ ## Test Verification
56
+
57
+ After populating documentation:
58
+
59
+ 1. **Run existing tests**: Execute the full test suite to establish the current baseline
60
+ 2. **Verify passing**: Document what passes and what fails — this is the project's test starting point
61
+ 3. **Cross-reference**: Verify that test files mentioned in `docs/requirements.md` Test Coverage table actually exist and pass
62
+
63
+ ---
64
+
40
65
  Replace all "{Project Name}" with the actual project name (from package.json, README, or folder name).
41
66
  Replace all "{Date}" with today date.
42
67
  Fill every section with real findings. If a section has nothing (e.g., no cron jobs), write "None" instead of placeholder text.
@@ -166,6 +166,31 @@ Initialize or update `.gsd-t/progress.md`:
166
166
 
167
167
  Ensure `CLAUDE.md` exists and references the roadmap and tech stack.
168
168
 
169
+ ## Step 5.5: Document Ripple
170
+
171
+ After creating the roadmap and updating project state, verify all documentation is consistent:
172
+
173
+ ### Always update:
174
+ 1. **`.gsd-t/progress.md`** — Already updated in Step 5, verify Decision Log includes project creation rationale and tech stack decisions
175
+
176
+ ### Check if affected:
177
+ 2. **`docs/requirements.md`** — If the project scope implies specific functional or technical requirements, add them now
178
+ 3. **`docs/architecture.md`** — If tech stack and architecture decisions were made, document them
179
+ 4. **`docs/workflows.md`** — If key user workflows are known from the project vision, outline them
180
+ 5. **`docs/infrastructure.md`** — If deployment targets and dev setup are known, document them
181
+ 6. **`CLAUDE.md`** — Ensure it references the roadmap, tech stack, and any conventions decided during project planning
182
+ 7. **`README.md`** — If created or exists, verify it reflects the project overview and tech stack
183
+
184
+ ### Skip what's not affected — early project stage means many docs are still minimal.
185
+
186
+ ## Step 5.6: Test Verification
187
+
188
+ Before reporting to the user:
189
+
190
+ 1. **If existing code**: Run the full test suite to establish a baseline before milestone work begins
191
+ 2. **If greenfield**: Note that test infrastructure should be established in Milestone 1
192
+ 3. **Document baseline**: Record the test state so progress can be measured across milestones
193
+
169
194
  ## Step 6: Report to User
170
195
 
171
196
  Present:
@@ -77,6 +77,29 @@ In `.gsd-t/progress.md`:
77
77
  - Log promotion in Decision Log: "{date}: Promoted {N} tech debt items to Milestone {N}: {name}"
78
78
  - Reorder milestones if critical items were inserted
79
79
 
80
+ ## Step 5.5: Document Ripple
81
+
82
+ After promoting debt items to milestones, update affected documentation:
83
+
84
+ ### Always update:
85
+ 1. **`.gsd-t/progress.md`** — Already updated in Step 5, verify Decision Log includes promotion rationale
86
+
87
+ ### Check if affected:
88
+ 2. **`docs/requirements.md`** — If promoted debt items imply new or changed requirements (e.g., security requirements from a security hardening milestone), add them
89
+ 3. **`docs/architecture.md`** — If promoted debt involves architectural changes, note planned modifications
90
+ 4. **`CLAUDE.md`** — If promotion changes the project's priority order or introduces new constraints, add them
91
+ 5. **`README.md`** — If the roadmap change affects what's documented in README (e.g., known issues section), update it
92
+
93
+ ### Skip what's not affected.
94
+
95
+ ## Step 5.6: Test Verification
96
+
97
+ Before reporting:
98
+
99
+ 1. **Run existing tests**: Execute the full test suite to confirm current state — promoted debt milestones should not change code yet
100
+ 2. **Verify passing**: Document any pre-existing failures that relate to the promoted debt items — these validate the promotion was warranted
101
+ 3. **Note test requirements**: For each promoted milestone, note what tests will need to be added or updated during execution
102
+
80
103
  ## Step 6: Report
81
104
 
82
105
  Present:
@@ -27,10 +27,11 @@ Proceed.
27
27
  ## Step 3: Execute
28
28
 
29
29
  1. Identify exactly which files need to change
30
- 2. If a contract exists for the relevant interface, implement to match it
31
- 3. Make the change
32
- 4. Verify it works
33
- 5. Commit: `[quick] {description}`
30
+ 2. **Destructive Action Guard**: Check if this task involves destructive or structural changes (DROP TABLE, removing columns, deleting data, replacing architecture patterns, removing working modules, changing schema in ways that conflict with existing data). If YES STOP and present the change to the user with what exists today, what will change, what will break, and a safe migration path. Wait for explicit approval.
31
+ 3. If a contract exists for the relevant interface, implement to match it
32
+ 4. Make the change — **adapt new code to existing structures**, not the other way around
33
+ 5. Verify it works
34
+ 6. Commit: `[quick] {description}`
34
35
 
35
36
  ## Step 4: Document Ripple (if GSD-T is active)
36
37
 
@@ -51,4 +52,14 @@ If `.gsd-t/progress.md` exists, assess what documentation was affected and updat
51
52
 
52
53
  ### Skip what's not affected — most quick tasks will only touch 1-2 of these.
53
54
 
55
+ ## Step 5: Test Verification
56
+
57
+ Before committing, verify the change works:
58
+
59
+ 1. **Update tests**: If the change adds or modifies behavior, update or add tests to cover it
60
+ 2. **Run affected tests**: Execute all tests related to the changed files and domain
61
+ 3. **Verify passing**: All tests must pass. If any fail, fix before proceeding (up to 2 attempts)
62
+ 4. **Run E2E tests**: If the change touched UI, routes, or user flows and an E2E framework exists, run affected specs
63
+ 5. **No test framework?**: At minimum, manually verify the change works as expected and document how you verified it in the commit message
64
+
54
65
  $ARGUMENTS
@@ -368,6 +368,14 @@ If `README.md` exists, merge — update tech stack and setup sections but preser
368
368
  - If the file doesn't exist, **create** it
369
369
  - Replace `{Project Name}` and `{Date}` tokens with actual values
370
370
 
371
+ ## Step 5.5: Test Verification
372
+
373
+ After updating living documents, verify nothing was broken:
374
+
375
+ 1. **Run existing tests**: Execute the full test suite to establish a baseline — document what passes and what was already failing
376
+ 2. **Verify passing**: If any tests fail that were passing before the scan began, investigate and fix
377
+ 3. **Log test baseline**: Record the current test state in `.gsd-t/scan/test-baseline.md` — this gives future milestones a starting point
378
+
371
379
  ## Step 6: Update Project State
372
380
 
373
381
  If `.gsd-t/progress.md` exists:
@@ -47,7 +47,9 @@ Work through each phase that hasn't been completed:
47
47
  - Count total independent starting tasks across domains
48
48
  - If 3+ domains with independent work AND teams are enabled: use team mode
49
49
  - Otherwise: solo mode
50
-
50
+
51
+ - **Destructive Action Guard**: Before each task, check if it involves destructive or structural changes (DROP TABLE, schema changes that lose data, removing existing modules, replacing architecture patterns). If YES → STOP and present the change to the user. Wait for explicit approval. This applies at ALL autonomy levels.
52
+
51
53
  - **After each task:**
52
54
  - Run quick test-sync (affected tests only)
53
55
  - If test failures: pause and report
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 27 slash commands with impact analysis, test sync, and milestone archival",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",
@@ -101,6 +101,44 @@ GSD-T tracks project version in `.gsd-t/progress.md` using semantic versioning:
101
101
  - Version is reflected in: `progress.md`, `README.md`, package manifest (if any), and git tags (`v{version}`)
102
102
 
103
103
 
104
+ # Destructive Action Guard (MANDATORY)
105
+
106
+ **NEVER perform destructive or structural changes without explicit user approval.** This applies at ALL autonomy levels, including Level 3.
107
+
108
+ ```
109
+ BEFORE any of these actions, STOP and ask the user:
110
+ ├── DROP TABLE, DROP COLUMN, DROP INDEX, TRUNCATE, DELETE without WHERE
111
+ ├── Renaming or removing database tables or columns
112
+ ├── Schema migrations that lose data or break existing queries
113
+ ├── Replacing an existing architecture pattern (e.g., normalized → denormalized)
114
+ ├── Removing or replacing existing files/modules that contain working functionality
115
+ ├── Changing ORM models in ways that conflict with the existing database schema
116
+ ├── Removing API endpoints or changing response shapes that existing clients depend on
117
+ ├── Replacing a dependency or framework with a different one
118
+ └── Any change that would require other parts of the system to be rewritten
119
+ ```
120
+
121
+ ### How to handle schema/architecture mismatches:
122
+ 1. **READ the existing schema/code first** — understand what exists before proposing changes
123
+ 2. **Adapt new code to match existing structures** — not the other way around
124
+ 3. **If restructuring is truly needed**, present the case to the user with:
125
+ - What exists today and why it might have been designed that way
126
+ - What you want to change and why
127
+ - What will break if you make the change
128
+ - What data or functionality will be lost
129
+ - A migration path that preserves existing data
130
+ 4. **Wait for explicit approval** before proceeding
131
+
132
+ ### Why this matters:
133
+ Even in development, the user may have:
134
+ - Working functionality they've tested and rely on
135
+ - Data they've carefully set up (seed data, test accounts, configuration)
136
+ - Other code that depends on the current structure
137
+ - Design decisions made for reasons not documented
138
+
139
+ **"Adapt to what exists" is always safer than "replace what exists."**
140
+
141
+
104
142
  # Autonomous Execution Rules
105
143
 
106
144
  ## Prime Rule
@@ -108,6 +146,7 @@ KEEP GOING. Only stop for:
108
146
  1. Unrecoverable errors after 2 fix attempts
109
147
  2. Ambiguity that fundamentally changes project direction
110
148
  3. Milestone completion (checkpoint for user review)
149
+ 4. Destructive actions (see Destructive Action Guard above — ALWAYS stop)
111
150
 
112
151
  ## Pre-Commit Gate (MANDATORY)
113
152
 
@@ -174,6 +213,9 @@ If not specified, use Level 2.
174
213
 
175
214
  # Don't Do These Things
176
215
 
216
+ - NEVER perform destructive or structural changes without explicit user approval (see Destructive Action Guard above).
217
+ - NEVER drop database tables, remove columns, or run destructive SQL on an existing database — adapt new code to the existing schema.
218
+ - NEVER replace existing architecture patterns (e.g., normalized → denormalized) without user approval — even if you think the new way is better.
177
219
  - NEVER commit code without running the Pre-Commit Gate checklist. EVERY commit.
178
220
  - NEVER batch doc updates for later — update docs as part of the same commit as the code change.
179
221
  - NEVER start a phase without reading contracts and relevant docs first.