create-sdd-project 0.16.2 → 0.16.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sdd-project",
3
- "version": "0.16.2",
3
+ "version": "0.16.4",
4
4
  "description": "Create a new SDD DevFlow project with AI-assisted development workflow",
5
5
  "bin": {
6
6
  "create-sdd-project": "bin/cli.js"
@@ -29,6 +29,14 @@ Before starting:
29
29
 
30
30
  ## `start pm` — New Autonomous Session
31
31
 
32
+ ### Phase 0: Previous Session Cleanup
33
+
34
+ 1. Check if `docs/project_notes/pm-session.md` exists.
35
+ 2. If it exists and Status is `completed` or `stopped`:
36
+ - Archive it: rename to `docs/project_notes/pm-session-{session-id}.md` (e.g., `pm-session-pm-c3a.md`).
37
+ - Print: `[PM] Archived previous session {session-id} → pm-session-{session-id}.md`
38
+ 3. If it exists and Status is `in-progress`: warn the user that a session is still active — suggest `continue pm` or `stop pm` first.
39
+
32
40
  ### Phase 1: Batch Selection
33
41
 
34
42
  1. Read `docs/project_notes/product-tracker.md` → collect all features with step < 6/6.
@@ -69,6 +77,7 @@ For each feature in the batch:
69
77
  - **Kill switch**: If `docs/project_notes/pm-stop.md` exists → stop gracefully (go to Shutdown).
70
78
  - **Lock**: If `docs/project_notes/pm-session.lock` is missing → stop (session was terminated externally).
71
79
  - **Circuit breaker**: If 3 consecutive features are `blocked` → stop and report to user.
80
+ - **Context check**: If **2+ features have been completed** in this session, STOP and tell the user to run `/compact` followed by `continue pm`. Do NOT continue to the next feature — context degradation causes skipped steps, lost constraints, and poor quality. This is mandatory, not a suggestion.
72
81
  - **Clean workspace**: Run `git status`. If dirty, commit or stash before proceeding.
73
82
 
74
83
  #### b. Start Feature
@@ -122,7 +131,7 @@ After each completed or blocked feature:
122
131
  2. If the current batch is exhausted and more eligible features remain:
123
132
  - Present the next 1-3 features to the user for complexity classification.
124
133
  - Add them to the batch in `pm-session.md`.
125
- 3. If **3+ features completed** in this session → suggest the user run `/compact` before continuing (context may be getting heavy).
134
+ 3. If **2+ features completed** in this session → STOP and tell the user to run `/compact` followed by `continue pm`. This is mandatory — do not ask, do not continue.
126
135
  4. If max session limit reached (**5 features**) → stop and report.
127
136
 
128
137
  ### Phase 4: Shutdown
@@ -151,7 +160,7 @@ Completed: 2/3 | Blocked: 1/3 | Remaining: 0
151
160
  ## `continue pm` — Resume After /compact or Restart
152
161
 
153
162
  1. Read `docs/project_notes/pm-session.md`. If it doesn't exist, inform user there is no active session.
154
- 2. **Validate session Status.** If Status is `completed` or `stopped`, inform user the session has ended. To start a new one, delete pm-session.md and run `start pm`.
163
+ 2. **Validate session Status.** If Status is `completed` or `stopped`, inform user the session has ended. To start a new one, run `start pm` (it will archive the old session automatically).
155
164
  3. **Re-create lock.** If `docs/project_notes/pm-session.lock` is missing (e.g., after terminal crash), re-create it with content: `session resumed at {ISO date}`.
156
165
  4. Find the feature with status `in-progress`:
157
166
  - Read its ticket file and the product tracker Active Session to determine current step.
@@ -182,6 +191,7 @@ Completed: 2/3 | Blocked: 1/3 | Remaining: 0
182
191
  | Guardrail | Value | Rationale |
183
192
  |-----------|-------|-----------|
184
193
  | Max features per session | 5 | Model attention degrades after many iterations |
194
+ | Mandatory compact after 2 features | STOP + `/compact` + `continue pm` | Context degradation causes skipped steps and lost constraints |
185
195
  | Consecutive failure circuit breaker | 3 | Prevent wasting resources on a systemic issue |
186
196
  | Kill switch | `pm-stop.md` or `stop pm` | User can always halt the loop |
187
197
  | Session lock | `pm-session.lock` | Prevents concurrent PM sessions |
@@ -29,6 +29,14 @@ Before starting:
29
29
 
30
30
  ## `start pm` — New Autonomous Session
31
31
 
32
+ ### Phase 0: Previous Session Cleanup
33
+
34
+ 1. Check if `docs/project_notes/pm-session.md` exists.
35
+ 2. If it exists and Status is `completed` or `stopped`:
36
+ - Archive it: rename to `docs/project_notes/pm-session-{session-id}.md` (e.g., `pm-session-pm-c3a.md`).
37
+ - Print: `[PM] Archived previous session {session-id} → pm-session-{session-id}.md`
38
+ 3. If it exists and Status is `in-progress`: warn the user that a session is still active — suggest `continue pm` or `stop pm` first.
39
+
32
40
  ### Phase 1: Batch Selection
33
41
 
34
42
  1. Read `docs/project_notes/product-tracker.md` → collect all features with step < 6/6.
@@ -69,6 +77,7 @@ For each feature in the batch:
69
77
  - **Kill switch**: If `docs/project_notes/pm-stop.md` exists → stop gracefully (go to Shutdown).
70
78
  - **Lock**: If `docs/project_notes/pm-session.lock` is missing → stop (session was terminated externally).
71
79
  - **Circuit breaker**: If 3 consecutive features are `blocked` → stop and report to user.
80
+ - **Context check**: If **2+ features have been completed** in this session, STOP and tell the user to run `/compact` followed by `continue pm`. Do NOT continue to the next feature — context degradation causes skipped steps, lost constraints, and poor quality. This is mandatory, not a suggestion.
72
81
  - **Clean workspace**: Run `git status`. If dirty, commit or stash before proceeding.
73
82
 
74
83
  #### b. Start Feature
@@ -122,7 +131,7 @@ After each completed or blocked feature:
122
131
  2. If the current batch is exhausted and more eligible features remain:
123
132
  - Present the next 1-3 features to the user for complexity classification.
124
133
  - Add them to the batch in `pm-session.md`.
125
- 3. If **3+ features completed** in this session → suggest the user run `/compact` before continuing (context may be getting heavy).
134
+ 3. If **2+ features completed** in this session → STOP and tell the user to run `/compact` followed by `continue pm`. This is mandatory — do not ask, do not continue.
126
135
  4. If max session limit reached (**5 features**) → stop and report.
127
136
 
128
137
  ### Phase 4: Shutdown
@@ -151,7 +160,7 @@ Completed: 2/3 | Blocked: 1/3 | Remaining: 0
151
160
  ## `continue pm` — Resume After /compact or Restart
152
161
 
153
162
  1. Read `docs/project_notes/pm-session.md`. If it doesn't exist, inform user there is no active session.
154
- 2. **Validate session Status.** If Status is `completed` or `stopped`, inform user the session has ended. To start a new one, delete pm-session.md and run `start pm`.
163
+ 2. **Validate session Status.** If Status is `completed` or `stopped`, inform user the session has ended. To start a new one, run `start pm` (it will archive the old session automatically).
155
164
  3. **Re-create lock.** If `docs/project_notes/pm-session.lock` is missing (e.g., after terminal crash), re-create it with content: `session resumed at {ISO date}`.
156
165
  4. Find the feature with status `in-progress`:
157
166
  - Read its ticket file and the product tracker Active Session to determine current step.
@@ -182,6 +191,7 @@ Completed: 2/3 | Blocked: 1/3 | Remaining: 0
182
191
  | Guardrail | Value | Rationale |
183
192
  |-----------|-------|-----------|
184
193
  | Max features per session | 5 | Model attention degrades after many iterations |
194
+ | Mandatory compact after 2 features | STOP + `/compact` + `continue pm` | Context degradation causes skipped steps and lost constraints |
185
195
  | Consecutive failure circuit breaker | 3 | Prevent wasting resources on a systemic issue |
186
196
  | Kill switch | `pm-stop.md` or `stop pm` | User can always halt the loop |
187
197
  | Session lock | `pm-session.lock` | Prevents concurrent PM sessions |