speclock 1.1.1 → 1.2.0

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": "speclock",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "AI continuity engine — MCP server + CLI that kills AI amnesia. Maintains project memory, enforces constraints, and detects drift across AI coding sessions.",
5
5
  "type": "module",
6
6
  "main": "src/mcp/server.js",
@@ -48,8 +48,40 @@ function createSpecLockServer() {
48
48
  const server = new McpServer(
49
49
  { name: "speclock", version: VERSION },
50
50
  {
51
- instructions:
52
- `SpecLock is an AI continuity engine. Developed by ${AUTHOR}. Call speclock_session_briefing at the start of a new session, and speclock_session_summary before ending. Use speclock_get_context to refresh your project understanding at any time.`,
51
+ instructions: [
52
+ `You have SpecLock connected an AI Continuity Engine by ${AUTHOR}. Follow these rules AUTOMATICALLY without the user ever having to ask:`,
53
+ ``,
54
+ `## ON EVERY NEW CONVERSATION / SESSION START:`,
55
+ `1. IMMEDIATELY call speclock_session_briefing BEFORE responding to the user's first message.`,
56
+ `2. If it returns "not initialized", call speclock_init first, then proceed normally.`,
57
+ `3. Use the briefing context to understand the project's goal, constraints, decisions, and history.`,
58
+ `4. Never ask the user to "initialize SpecLock" or "start a session" — just do it silently.`,
59
+ ``,
60
+ `## AUTOMATIC CONTEXT CAPTURE (do this silently as you work):`,
61
+ `- When the user describes what they're building → call speclock_set_goal with a concise summary.`,
62
+ `- When the user says something is non-negotiable (e.g., "always use Supabase", "never remove auth", "must support mobile") → call speclock_add_lock to save it as an immutable constraint.`,
63
+ `- When the user makes a technology/architecture choice (e.g., "let's use React Query", "we'll go with Stripe") → call speclock_add_decision.`,
64
+ `- When you complete a significant piece of work → call speclock_log_change.`,
65
+ `- Look for keywords like "always", "never", "must", "don't ever", "make sure to keep" — these signal constraints that should be locked.`,
66
+ ``,
67
+ `## BEFORE MAKING SIGNIFICANT CHANGES:`,
68
+ `- Call speclock_check_conflict with a description of what you're about to do.`,
69
+ `- If a conflict is detected (confidence HIGH), WARN the user and explain which constraint would be violated.`,
70
+ `- Do NOT proceed with the change unless the user explicitly says to override or remove the lock.`,
71
+ ``,
72
+ `## WHEN THE USER ASKS TO REMOVE SOMETHING THEY PREVIOUSLY LOCKED:`,
73
+ `- Remind them: "You previously locked this constraint: [constraint text]. Want me to remove the lock and proceed?"`,
74
+ `- If they confirm, call speclock_remove_lock, then proceed.`,
75
+ ``,
76
+ `## AT THE END OF A CONVERSATION (when the user says goodbye, or the conversation naturally ends):`,
77
+ `- Call speclock_session_summary with a brief description of what was accomplished.`,
78
+ ``,
79
+ `## IMPORTANT:`,
80
+ `- NEVER mention "SpecLock" to the user unless they ask about it. Just use it silently in the background.`,
81
+ `- The user should feel like the AI simply "remembers everything" — SpecLock is invisible infrastructure.`,
82
+ `- If the user asks "how do you remember this?" you can explain SpecLock is connected as a memory layer.`,
83
+ `- When showing the user what you know from previous sessions, present it naturally, not as a data dump.`,
84
+ ].join("\n"),
53
85
  }
54
86
  );
55
87
 
@@ -264,7 +296,7 @@ app.get("/", (req, res) => {
264
296
  tools: 19,
265
297
  mcp_endpoint: "/mcp",
266
298
  npm: "https://www.npmjs.com/package/speclock",
267
- github: "https://github.com/sgroy10/flowkeeper",
299
+ github: "https://github.com/sgroy10/speclock",
268
300
  });
269
301
  });
270
302
 
package/src/mcp/server.js CHANGED
@@ -56,8 +56,40 @@ const AUTHOR = "Sandeep Roy";
56
56
  const server = new McpServer(
57
57
  { name: "speclock", version: VERSION },
58
58
  {
59
- instructions:
60
- `SpecLock is an AI continuity engine. Developed by ${AUTHOR}. Call speclock_session_briefing at the start of a new session, and speclock_session_summary before ending. Use speclock_get_context to refresh your project understanding at any time.`,
59
+ instructions: [
60
+ `You have SpecLock connected an AI Continuity Engine by ${AUTHOR}. Follow these rules AUTOMATICALLY without the user ever having to ask:`,
61
+ ``,
62
+ `## ON EVERY NEW CONVERSATION / SESSION START:`,
63
+ `1. IMMEDIATELY call speclock_session_briefing BEFORE responding to the user's first message.`,
64
+ `2. If it returns "not initialized", call speclock_init first, then proceed normally.`,
65
+ `3. Use the briefing context to understand the project's goal, constraints, decisions, and history.`,
66
+ `4. Never ask the user to "initialize SpecLock" or "start a session" — just do it silently.`,
67
+ ``,
68
+ `## AUTOMATIC CONTEXT CAPTURE (do this silently as you work):`,
69
+ `- When the user describes what they're building → call speclock_set_goal with a concise summary.`,
70
+ `- When the user says something is non-negotiable (e.g., "always use Supabase", "never remove auth", "must support mobile") → call speclock_add_lock to save it as an immutable constraint.`,
71
+ `- When the user makes a technology/architecture choice (e.g., "let's use React Query", "we'll go with Stripe") → call speclock_add_decision.`,
72
+ `- When you complete a significant piece of work → call speclock_log_change.`,
73
+ `- Look for keywords like "always", "never", "must", "don't ever", "make sure to keep" — these signal constraints that should be locked.`,
74
+ ``,
75
+ `## BEFORE MAKING SIGNIFICANT CHANGES:`,
76
+ `- Call speclock_check_conflict with a description of what you're about to do.`,
77
+ `- If a conflict is detected (confidence HIGH), WARN the user and explain which constraint would be violated.`,
78
+ `- Do NOT proceed with the change unless the user explicitly says to override or remove the lock.`,
79
+ ``,
80
+ `## WHEN THE USER ASKS TO REMOVE SOMETHING THEY PREVIOUSLY LOCKED:`,
81
+ `- Remind them: "You previously locked this constraint: [constraint text]. Want me to remove the lock and proceed?"`,
82
+ `- If they confirm, call speclock_remove_lock, then proceed.`,
83
+ ``,
84
+ `## AT THE END OF A CONVERSATION (when the user says goodbye, or the conversation naturally ends):`,
85
+ `- Call speclock_session_summary with a brief description of what was accomplished.`,
86
+ ``,
87
+ `## IMPORTANT:`,
88
+ `- NEVER mention "SpecLock" to the user unless they ask about it. Just use it silently in the background.`,
89
+ `- The user should feel like the AI simply "remembers everything" — SpecLock is invisible infrastructure.`,
90
+ `- If the user asks "how do you remember this?" you can explain SpecLock is connected as a memory layer.`,
91
+ `- When showing the user what you know from previous sessions, present it naturally, not as a data dump.`,
92
+ ].join("\n"),
61
93
  }
62
94
  );
63
95