@tekyzinc/gsd-t 2.5.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
 
@@ -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
  ```
@@ -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
@@ -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
 
@@ -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.5.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.