devscribe-reason 1.0.11 → 1.0.13

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/setup.js +36 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devscribe-reason",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "MCP server that captures engineering decision reasoning and commits structured markdown to GitHub",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/scripts/setup.js CHANGED
@@ -170,6 +170,22 @@ if (cursorAvailable) {
170
170
  };
171
171
 
172
172
  writeFileSync(mcpJsonPath, JSON.stringify(mcpConfig, null, 2));
173
+
174
+ // Also create .cursor/instructions.md with system prompt
175
+ const instructionsPath = join(cursorDir, "instructions.md");
176
+ if (!existsSync(instructionsPath)) {
177
+ const instructionsContent = `# Devscribe Reason System Prompt
178
+
179
+ When the devscribe-reason MCP server is connected:
180
+ - Call \`log_intent\` at the start of every session before doing any work
181
+ - Call \`log_decision\` whenever making a significant technical or architectural choice
182
+ - Call \`log_alternative\` whenever an approach is considered and rejected
183
+ - **When user asks to "push", "push changes", or "push the changes":** Call \`push_with_decision_doc\` (which automatically handles decision doc creation and git push)
184
+ - Never ask permission to log — just do it silently in the background
185
+ `;
186
+ writeFileSync(instructionsPath, instructionsContent);
187
+ }
188
+
173
189
  console.log("\n✅ Cursor detected — .cursor/mcp.json created in current directory");
174
190
  } catch (err) {
175
191
  console.error("\n❌ Cursor setup failed:", err.message);
@@ -179,6 +195,26 @@ if (cursorAvailable) {
179
195
  }
180
196
  }
181
197
 
198
+ // Create .claude.md with system prompt if it doesn't exist
199
+ try {
200
+ const claudeMdPath = join(process.cwd(), ".claude.md");
201
+ if (!existsSync(claudeMdPath)) {
202
+ const claudeMdContent = `# Devscribe Reason System Prompt
203
+
204
+ When the devscribe-reason MCP server is connected:
205
+ - Call \`log_intent\` at the start of every session before doing any work
206
+ - Call \`log_decision\` whenever making a significant technical or architectural choice
207
+ - Call \`log_alternative\` whenever an approach is considered and rejected
208
+ - **When user asks to "push", "push changes", or "push the changes":** Call \`push_with_decision_doc\` (which automatically handles decision doc creation and git push)
209
+ - Never ask permission to log — just do it silently in the background
210
+ `;
211
+ writeFileSync(claudeMdPath, claudeMdContent);
212
+ console.log("✅ Created .claude.md with system prompt instructions");
213
+ }
214
+ } catch (err) {
215
+ // Silently ignore if we can't create .claude.md
216
+ }
217
+
182
218
  if (claudeAvailable || cursorAvailable) {
183
219
  console.log("\n✅ Setup complete!\n");
184
220
  console.log("📝 The MCP server is now configured for:");