pmpt-cli 1.14.15 → 1.14.18
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/dist/commands/clone.js +8 -8
- package/dist/commands/remix.js +20 -6
- package/dist/lib/plan.js +10 -2
- package/package.json +1 -1
package/dist/commands/clone.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as p from '@clack/prompts';
|
|
2
2
|
import { join, dirname, resolve, sep } from 'path';
|
|
3
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync
|
|
3
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
4
4
|
import { isInitialized, getConfigDir, getHistoryDir, getDocsDir, initializeProject } from '../lib/config.js';
|
|
5
5
|
import { validatePmptFile, isSafeFilename } from '../lib/pmptFile.js';
|
|
6
6
|
import { fetchPmptFile, trackClone } from '../lib/api.js';
|
|
@@ -110,7 +110,8 @@ export async function cmdClone(slug) {
|
|
|
110
110
|
const pmptDir = getConfigDir(projectPath);
|
|
111
111
|
const historyDir = getHistoryDir(projectPath);
|
|
112
112
|
const docsDir = getDocsDir(projectPath);
|
|
113
|
-
|
|
113
|
+
// History is not restored — user's journey starts fresh from v1.
|
|
114
|
+
// The version summary is embedded in pmpt.ai.md for AI reference.
|
|
114
115
|
if (pmptData.docs) {
|
|
115
116
|
restoreDocs(docsDir, pmptData.docs);
|
|
116
117
|
}
|
|
@@ -160,7 +161,9 @@ export async function cmdClone(slug) {
|
|
|
160
161
|
`- When requirements change or new decisions are made`,
|
|
161
162
|
'',
|
|
162
163
|
`Keep the Progress and Snapshot Log sections in pmpt.md up to date.`,
|
|
163
|
-
`After significant milestones,
|
|
164
|
+
`After significant milestones, save a snapshot:`,
|
|
165
|
+
`- **If pmpt MCP tool is available** (Claude Code, Cursor with MCP): call \`pmpt_save\` directly with a descriptive summary. Do this proactively — do not wait for the user to ask.`,
|
|
166
|
+
`- **Otherwise**: run \`pmpt save\` in terminal.`,
|
|
164
167
|
'',
|
|
165
168
|
'---',
|
|
166
169
|
'',
|
|
@@ -175,16 +178,13 @@ export async function cmdClone(slug) {
|
|
|
175
178
|
answers: pmptData.plan,
|
|
176
179
|
}, null, 2), 'utf-8');
|
|
177
180
|
}
|
|
178
|
-
let versionCount = 0;
|
|
179
|
-
if (existsSync(historyDir)) {
|
|
180
|
-
versionCount = readdirSync(historyDir).filter((d) => d.startsWith('v')).length;
|
|
181
|
-
}
|
|
182
181
|
importSpinner.stop('Restore complete!');
|
|
183
182
|
// Track clone event (fire-and-forget)
|
|
184
183
|
trackClone(slug);
|
|
185
184
|
p.note([
|
|
186
185
|
`Project: ${pmptData.meta.projectName}`,
|
|
187
|
-
`
|
|
186
|
+
`Cloned from: @${pmptData.meta.author || 'unknown'} (${pmptData.history.length} versions)`,
|
|
187
|
+
`Your history: starts fresh from v1`,
|
|
188
188
|
`Location: ${pmptDir}`,
|
|
189
189
|
].join('\n'), 'Clone Summary');
|
|
190
190
|
// Copy AI prompt to clipboard
|
package/dist/commands/remix.js
CHANGED
|
@@ -88,12 +88,24 @@ ${contextSection}${techSection}
|
|
|
88
88
|
|
|
89
89
|
## Instructions for AI
|
|
90
90
|
|
|
91
|
-
This is a **remix** of an existing project.
|
|
91
|
+
This is a **remix** of an existing project. Before building anything, do the following:
|
|
92
92
|
|
|
93
|
-
1
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
**Step 1 — Understand & Clarify (do this first)**
|
|
94
|
+
|
|
95
|
+
Read my "My Version" section above and the original project below carefully, then ask me clarifying questions. Specifically, identify:
|
|
96
|
+
- Anything in my differentiation that is ambiguous or unclear
|
|
97
|
+
- Information that would be needed to build my version but is not provided
|
|
98
|
+
- Assumptions you would have to make — ask instead of assuming
|
|
99
|
+
- Any conflict between my twist and the original that needs resolution
|
|
100
|
+
|
|
101
|
+
Ask all your questions in a single message. Wait for my answers before proceeding.
|
|
102
|
+
|
|
103
|
+
**Step 2 — Build**
|
|
104
|
+
|
|
105
|
+
After I answer your questions, build MY version based on the differentiation and my answers.
|
|
106
|
+
- Same core concept as the original, but with my differentiation applied throughout
|
|
107
|
+
- Do NOT copy content verbatim. Adapt everything to fit my context
|
|
108
|
+
- Start with core features first, then iterate
|
|
97
109
|
|
|
98
110
|
### Documentation Rule
|
|
99
111
|
|
|
@@ -102,7 +114,9 @@ When you make progress, update \`.pmpt/docs/pmpt.md\`:
|
|
|
102
114
|
- When a feature is implemented (mark as done)
|
|
103
115
|
- When a development phase is completed
|
|
104
116
|
|
|
105
|
-
Keep the Snapshot Log up to date.
|
|
117
|
+
Keep the Snapshot Log up to date. After milestones, save a snapshot:
|
|
118
|
+
- **If pmpt MCP tool is available** (Claude Code, Cursor with MCP): call \`pmpt_save\` directly with a descriptive summary. Do this proactively — do not wait for the user to ask.
|
|
119
|
+
- **Otherwise**: run \`pmpt save\` in terminal.
|
|
106
120
|
|
|
107
121
|
---
|
|
108
122
|
|
package/dist/lib/plan.js
CHANGED
|
@@ -98,13 +98,21 @@ ${workflowSteps}
|
|
|
98
98
|
- When requirements change or new decisions are made
|
|
99
99
|
|
|
100
100
|
Keep the Progress and Snapshot Log sections in pmpt.md up to date.
|
|
101
|
-
After significant milestones,
|
|
101
|
+
After significant milestones, save a snapshot using the method below.
|
|
102
|
+
|
|
103
|
+
### Saving Snapshots
|
|
104
|
+
|
|
105
|
+
**If the pmpt MCP tool is available** (Claude Code, Cursor with MCP configured):
|
|
106
|
+
Call the \`pmpt_save\` MCP tool directly with a descriptive summary. Do this proactively after milestones — do not wait for the user to ask.
|
|
107
|
+
|
|
108
|
+
**Otherwise:**
|
|
109
|
+
Run \`pmpt save\` in the terminal.
|
|
102
110
|
|
|
103
111
|
### Per-Feature Checklist
|
|
104
112
|
After completing each feature above:
|
|
105
113
|
1. Mark the feature done in \`.pmpt/docs/pmpt.md\` (change \`- [ ]\` to \`- [x]\`)
|
|
106
114
|
2. Add a brief note to the Snapshot Log section
|
|
107
|
-
3.
|
|
115
|
+
3. Save a snapshot (MCP tool or \`pmpt save\`)
|
|
108
116
|
|
|
109
117
|
### What to Record in pmpt.md
|
|
110
118
|
|