pmpt-cli 1.14.12 → 1.14.14

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.
@@ -275,6 +275,10 @@ function ensureMinimalDocs(projectPath) {
275
275
  '',
276
276
  '## Decisions',
277
277
  '',
278
+ '## Constraints',
279
+ '',
280
+ '## Lessons',
281
+ '',
278
282
  ].join('\n');
279
283
  writeFileSync(pmptMdPath, skeleton, 'utf-8');
280
284
  }
@@ -51,7 +51,7 @@ export async function cmdSave(fileOrPath) {
51
51
  p.cancel('Save cancelled.');
52
52
  process.exit(0);
53
53
  }
54
- const note = summary.trim() || undefined;
54
+ const note = typeof summary === 'string' ? summary.trim() || undefined : undefined;
55
55
  // Write summary to pmpt.md Snapshot Log before snapshot
56
56
  if (note) {
57
57
  const pmptMdPath = join(docsDir, 'pmpt.md');
package/dist/lib/plan.js CHANGED
@@ -105,6 +105,20 @@ After completing each feature above:
105
105
  1. Mark the feature done in \`.pmpt/docs/pmpt.md\` (change \`- [ ]\` to \`- [x]\`)
106
106
  2. Add a brief note to the Snapshot Log section
107
107
  3. Run \`pmpt save\` in terminal
108
+
109
+ ### What to Record in pmpt.md
110
+
111
+ **## Decisions** — Record WHY, not just WHAT. Include the data or observation that led to the decision.
112
+ - Bad: "Set minimum description length to 150 chars"
113
+ - Good: "Set minimum description length to 150 chars (50-char threshold caused 60% low-quality entries)"
114
+
115
+ **## Constraints** — Record platform/library limitations discovered during development.
116
+ - Examples: DB quirks, API limits, framework restrictions, version incompatibilities
117
+ - Format: \`- [Platform]: what doesn't work → workaround used\`
118
+
119
+ **## Lessons** — Record anti-patterns and "we tried X, it broke because Y" discoveries.
120
+ - Examples: wrong deletion order causing FK errors, caching issues, race conditions
121
+ - Format: \`- [What failed] → [Root cause] → [Fix applied]\`
108
122
  `;
109
123
  }
110
124
  // Generate human-facing project document (pmpt.md)
@@ -138,6 +152,12 @@ ${techSection}
138
152
  ### v1 - Initial Setup
139
153
  - Project initialized with pmpt
140
154
 
155
+ ## Decisions
156
+
157
+ ## Constraints
158
+
159
+ ## Lessons
160
+
141
161
  ---
142
162
  *This document tracks your project progress. Update it as you build.*
143
163
  *AI instructions are in \`pmpt.ai.md\` — paste that into your AI tool.*
package/dist/mcp.js CHANGED
@@ -123,6 +123,10 @@ server.tool('pmpt_save', 'Save a snapshot of .pmpt/docs/ files. Call after compl
123
123
  '',
124
124
  '## Decisions',
125
125
  '',
126
+ '## Constraints',
127
+ '',
128
+ '## Lessons',
129
+ '',
126
130
  ].join('\n');
127
131
  writeFileSync(pmptMdPath, skeleton, 'utf-8');
128
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmpt-cli",
3
- "version": "1.14.12",
3
+ "version": "1.14.14",
4
4
  "description": "Record and share your AI-driven product development journey",
5
5
  "type": "module",
6
6
  "bin": {