@esneiderbravo/speclaw 0.1.6 → 0.1.7

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.
@@ -8,6 +8,7 @@ import { AGENTS, agentById } from "../../shared/agents.js";
8
8
  import { loadPacks } from "../../modules/tools/packs.js";
9
9
  import { list } from "../lib/args.js";
10
10
  import { ui, c, banner, renderProgress, clearProgress } from "../lib/ui.js";
11
+ import { checkForUpdates } from "../lib/update-check.js";
11
12
  const PACK_LABELS = {
12
13
  agents: "dev-agents (backend · frontend · product)",
13
14
  };
@@ -36,6 +37,15 @@ export async function runInit(flags) {
36
37
  let agents;
37
38
  let packs;
38
39
  banner();
40
+ // Scaffolding with a stale version writes yesterday's foundation, so recommend
41
+ // upgrading first — prominently, before any prompts, so there's time to cancel.
42
+ // Best-effort and cache-backed (no added latency); the command still proceeds.
43
+ const upd = await checkForUpdates();
44
+ if (upd.updateAvailable && upd.latest) {
45
+ ui.warn(`You're on ${c.muted(upd.current)} — latest is ${c.bold(c.cyan(upd.latest))}.`);
46
+ ui.info(`Recommended: run ${ui.code("speclaw update")} first, then ${ui.code("speclaw init")} again.`);
47
+ ui.plain();
48
+ }
39
49
  if (interactive) {
40
50
  const answers = await clack.group({
41
51
  agents: () => clack.multiselect({
@@ -105,7 +105,9 @@ export async function maybeNotifyUpdate(cmd) {
105
105
  return;
106
106
  if (!process.stderr.isTTY)
107
107
  return;
108
- if (!cmd || ["mcp", "update", "help", "--help", "-h"].includes(cmd))
108
+ // `init` shows its own prominent up-front warning and ends on the clean
109
+ // copy-paste prompt — don't append a second notice after it.
110
+ if (!cmd || ["mcp", "update", "init", "help", "--help", "-h"].includes(cmd))
109
111
  return;
110
112
  const { current, latest, updateAvailable } = await checkForUpdates();
111
113
  if (!updateAvailable || !latest)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esneiderbravo/speclaw",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },