create-sdd-project 0.9.6 → 0.9.8
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/lib/config.js
CHANGED
|
@@ -103,6 +103,12 @@ const TEMPLATE_AGENTS = [
|
|
|
103
103
|
'qa-engineer.md',
|
|
104
104
|
];
|
|
105
105
|
|
|
106
|
+
// Template-provided command files (for upgrade: detect custom commands)
|
|
107
|
+
const TEMPLATE_COMMANDS = [
|
|
108
|
+
'review-plan.md',
|
|
109
|
+
'context-prompt.md',
|
|
110
|
+
];
|
|
111
|
+
|
|
106
112
|
module.exports = {
|
|
107
113
|
DEFAULTS,
|
|
108
114
|
PROJECT_TYPES,
|
|
@@ -114,4 +120,5 @@ module.exports = {
|
|
|
114
120
|
FRONTEND_AGENTS,
|
|
115
121
|
BACKEND_AGENTS,
|
|
116
122
|
TEMPLATE_AGENTS,
|
|
123
|
+
TEMPLATE_COMMANDS,
|
|
117
124
|
};
|
package/lib/upgrade-generator.js
CHANGED
|
@@ -7,6 +7,7 @@ const {
|
|
|
7
7
|
FRONTEND_AGENTS,
|
|
8
8
|
BACKEND_AGENTS,
|
|
9
9
|
TEMPLATE_AGENTS,
|
|
10
|
+
TEMPLATE_COMMANDS,
|
|
10
11
|
} = require('./config');
|
|
11
12
|
const { adaptAgentContentForProjectType } = require('./adapt-agents');
|
|
12
13
|
const {
|
|
@@ -110,7 +111,7 @@ function collectCustomAgents(dest) {
|
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
/**
|
|
113
|
-
* Find custom command files (not .gitkeep).
|
|
114
|
+
* Find custom command files (not .gitkeep, not template-owned).
|
|
114
115
|
* Returns array of { relativePath, content } objects.
|
|
115
116
|
*/
|
|
116
117
|
function collectCustomCommands(dest) {
|
|
@@ -120,6 +121,7 @@ function collectCustomCommands(dest) {
|
|
|
120
121
|
const files = fs.readdirSync(commandsDir);
|
|
121
122
|
for (const file of files) {
|
|
122
123
|
if (file === '.gitkeep') continue;
|
|
124
|
+
if (TEMPLATE_COMMANDS.includes(file)) continue;
|
|
123
125
|
customs.push({
|
|
124
126
|
relativePath: path.join('.claude', 'commands', file),
|
|
125
127
|
content: fs.readFileSync(path.join(commandsDir, file), 'utf8'),
|
|
@@ -239,14 +241,12 @@ function generateUpgrade(config) {
|
|
|
239
241
|
const srcSub = path.join(templateToolDir, sub);
|
|
240
242
|
const destSub = path.join(base, sub);
|
|
241
243
|
if (fs.existsSync(srcSub)) {
|
|
242
|
-
// For .claude/commands, merge:
|
|
244
|
+
// For .claude/commands, merge: overwrite SDD template commands, preserve user's custom commands
|
|
243
245
|
if (dir === '.claude' && sub === 'commands') {
|
|
244
246
|
fs.mkdirSync(destSub, { recursive: true });
|
|
245
247
|
for (const file of fs.readdirSync(srcSub)) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
fs.cpSync(path.join(srcSub, file), destFile);
|
|
249
|
-
}
|
|
248
|
+
// Always overwrite template-owned files (they may have been updated)
|
|
249
|
+
fs.cpSync(path.join(srcSub, file), path.join(destSub, file));
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
fs.cpSync(srcSub, destSub, { recursive: true });
|
package/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Generate a complete context recovery prompt to paste after /compact or at the start of a new session.
|
|
2
|
+
|
|
3
|
+
## What to include
|
|
4
|
+
|
|
5
|
+
The prompt must contain EVERYTHING needed for a new session (or post-compact) to continue work without information loss:
|
|
6
|
+
|
|
7
|
+
1. **Project state**: current branch, last commit, working tree status, SDD version
|
|
8
|
+
2. **Workflow**: SDD development workflow, autonomy level, branching strategy
|
|
9
|
+
3. **Active feature**: current step in the 6-step workflow, what has been done, what remains
|
|
10
|
+
4. **Epics and progress**: table with status of each epic
|
|
11
|
+
5. **Backlog**: pending features with priorities and dependencies
|
|
12
|
+
6. **Infrastructure**: key modules, endpoints, schemas, with exact file paths
|
|
13
|
+
7. **Tests**: total count, files, lint/build/tsc status
|
|
14
|
+
8. **Key files to read**: list of files the new session must read first
|
|
15
|
+
9. **Next action**: the specific next thing to do, with context
|
|
16
|
+
10. **User notes**: any decisions or constraints communicated by the user
|
|
17
|
+
|
|
18
|
+
### Workflow Recovery (CRITICAL)
|
|
19
|
+
|
|
20
|
+
This section prevents the agent from losing track of the development process after /compact:
|
|
21
|
+
|
|
22
|
+
11. **Current workflow step**: Which of the 6 steps (Spec, Setup, Plan, Implement, Finalize, Review) is active
|
|
23
|
+
12. **Pending checkpoints**: Which approvals remain (Spec, Ticket, Plan, Commit, Merge)
|
|
24
|
+
13. **Merge checklist reminder**: If at Step 5 or later, explicitly state: "Before requesting merge approval, you MUST read `references/merge-checklist.md` and execute ALL actions (0-8). Fill the `## Merge Checklist Evidence` table in the ticket with real evidence for each action."
|
|
25
|
+
14. **Step order reminder**: "After commit+PR, run code-review-specialist and qa-engineer (Step 5), then execute merge-checklist actions. Do NOT request merge approval without completing the checklist."
|
|
26
|
+
|
|
27
|
+
## How to generate
|
|
28
|
+
|
|
29
|
+
- Read `docs/project_notes/product-tracker.md` (Active Session + Features tables + Completion Log)
|
|
30
|
+
- Read `docs/project_notes/decisions.md` (recent ADRs)
|
|
31
|
+
- Read `docs/project_notes/key_facts.md` (stack, components)
|
|
32
|
+
- Read the current ticket in `docs/tickets/` if a feature is active
|
|
33
|
+
- Run `git log --oneline -5` and `git status` for current state
|
|
34
|
+
- Read `.sdd-version` for SDD DevFlow version
|
|
35
|
+
|
|
36
|
+
## Output format
|
|
37
|
+
|
|
38
|
+
Structured markdown with tables, ready to paste directly as the first message of a new session. The prompt should be self-contained — the receiving agent should not need to ask clarifying questions.
|
|
39
|
+
|
|
40
|
+
## Context
|
|
41
|
+
|
|
42
|
+
- Users work remotely with long sessions — interruptions are costly
|
|
43
|
+
- After /review-plan + plan approval, context is typically at 50%+ usage, making /compact necessary before implementation
|
|
44
|
+
- The workflow recovery section is essential: without it, the agent may skip merge checklist actions after /compact
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## Context Prompt — Instructions
|
|
2
|
+
|
|
3
|
+
Generate a complete context recovery prompt to paste after compaction or at the start of a new session.
|
|
4
|
+
|
|
5
|
+
### What to include
|
|
6
|
+
|
|
7
|
+
The prompt must contain EVERYTHING needed for a new session (or post-compact) to continue work without information loss:
|
|
8
|
+
|
|
9
|
+
1. **Project state**: current branch, last commit, working tree status, SDD version
|
|
10
|
+
2. **Workflow**: SDD development workflow, autonomy level, branching strategy
|
|
11
|
+
3. **Active feature**: current step in the 6-step workflow, what has been done, what remains
|
|
12
|
+
4. **Epics and progress**: table with status of each epic
|
|
13
|
+
5. **Backlog**: pending features with priorities and dependencies
|
|
14
|
+
6. **Infrastructure**: key modules, endpoints, schemas, with exact file paths
|
|
15
|
+
7. **Tests**: total count, files, lint/build/tsc status
|
|
16
|
+
8. **Key files to read**: list of files the new session must read first
|
|
17
|
+
9. **Next action**: the specific next thing to do, with context
|
|
18
|
+
10. **User notes**: any decisions or constraints communicated by the user
|
|
19
|
+
|
|
20
|
+
#### Workflow Recovery (CRITICAL)
|
|
21
|
+
|
|
22
|
+
This section prevents the agent from losing track of the development process after compaction:
|
|
23
|
+
|
|
24
|
+
11. **Current workflow step**: Which of the 6 steps (Spec, Setup, Plan, Implement, Finalize, Review) is active
|
|
25
|
+
12. **Pending checkpoints**: Which approvals remain (Spec, Ticket, Plan, Commit, Merge)
|
|
26
|
+
13. **Merge checklist reminder**: If at Step 5 or later, explicitly state: "Before requesting merge approval, you MUST read `references/merge-checklist.md` and execute ALL actions (0-8). Fill the `## Merge Checklist Evidence` table in the ticket with real evidence for each action."
|
|
27
|
+
14. **Step order reminder**: "After commit+PR, run code-review-specialist and qa-engineer (Step 5), then execute merge-checklist actions. Do NOT request merge approval without completing the checklist."
|
|
28
|
+
|
|
29
|
+
### How to generate
|
|
30
|
+
|
|
31
|
+
- Read `docs/project_notes/product-tracker.md` (Active Session + Features tables + Completion Log)
|
|
32
|
+
- Read `docs/project_notes/decisions.md` (recent ADRs)
|
|
33
|
+
- Read `docs/project_notes/key_facts.md` (stack, components)
|
|
34
|
+
- Read the current ticket in `docs/tickets/` if a feature is active
|
|
35
|
+
- Run `git log --oneline -5` and `git status` for current state
|
|
36
|
+
- Read `.sdd-version` for SDD DevFlow version
|
|
37
|
+
|
|
38
|
+
### Output format
|
|
39
|
+
|
|
40
|
+
Structured markdown with tables, ready to paste directly as the first message of a new session. The prompt should be self-contained — the receiving agent should not need to ask clarifying questions.
|
|
41
|
+
|
|
42
|
+
### Context
|
|
43
|
+
|
|
44
|
+
- Users work remotely with long sessions — interruptions are costly
|
|
45
|
+
- After plan review + plan approval, context is typically at 50%+ usage, making compaction necessary before implementation
|
|
46
|
+
- The workflow recovery section is essential: without it, the agent may skip merge checklist actions after compaction
|