@esneiderbravo/speclaw 0.1.6 → 0.1.8
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/README.md +8 -8
- package/dist/cli/commands/init.js +10 -0
- package/dist/cli/lib/update-check.js +3 -1
- package/dist/shared/agents.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ One command. No cloud, no LLM, no API keys — <b>everything runs on your machin
|
|
|
35
35
|
|
|
36
36
|
<br/>
|
|
37
37
|
|
|
38
|
-
## ◆ Quick start
|
|
38
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> Quick start
|
|
39
39
|
|
|
40
40
|
Install speclaw globally (once), then run `init` in your project root:
|
|
41
41
|
|
|
@@ -67,7 +67,7 @@ too (also `pnpm dlx` / `yarn dlx`) — but installing globally means you can run
|
|
|
67
67
|
|
|
68
68
|
<br/>
|
|
69
69
|
|
|
70
|
-
## ◆ It looks like this
|
|
70
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> It looks like this
|
|
71
71
|
|
|
72
72
|
<p align="center">
|
|
73
73
|
<img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/terminal-init.png" width="800" alt="speclaw init — terminal output">
|
|
@@ -77,7 +77,7 @@ too (also `pnpm dlx` / `yarn dlx`) — but installing globally means you can run
|
|
|
77
77
|
|
|
78
78
|
<br/>
|
|
79
79
|
|
|
80
|
-
## ◆ The suite — four modules
|
|
80
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> The suite — four modules
|
|
81
81
|
|
|
82
82
|
| Module | What it does |
|
|
83
83
|
| :-- | :-- |
|
|
@@ -90,7 +90,7 @@ Compass is inspired by [CodeGraph](https://github.com/colbymchenry/codegraph) an
|
|
|
90
90
|
|
|
91
91
|
<br/>
|
|
92
92
|
|
|
93
|
-
## ◆ Two ways to use it
|
|
93
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> Two ways to use it
|
|
94
94
|
|
|
95
95
|
speclaw meets you where you are. Everything works through the **CLI** — so no one
|
|
96
96
|
is blocked by MCP setup — and the same capabilities are exposed as **MCP tools**
|
|
@@ -105,7 +105,7 @@ still use Compass and the lawbook engine by calling the CLI from its shell.
|
|
|
105
105
|
|
|
106
106
|
<br/>
|
|
107
107
|
|
|
108
|
-
## ◆ What lands in your project
|
|
108
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> What lands in your project
|
|
109
109
|
|
|
110
110
|
<p align="center">
|
|
111
111
|
<img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/terminal-tree.png" width="800" alt="what speclaw writes into your project">
|
|
@@ -113,7 +113,7 @@ still use Compass and the lawbook engine by calling the CLI from its shell.
|
|
|
113
113
|
|
|
114
114
|
<br/>
|
|
115
115
|
|
|
116
|
-
## ◆ Philosophy — why "laws"?
|
|
116
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> Philosophy — why "laws"?
|
|
117
117
|
|
|
118
118
|
> [!NOTE]
|
|
119
119
|
> A guideline is a suggestion. A **law** is enforced. The most common failure mode
|
|
@@ -124,7 +124,7 @@ still use Compass and the lawbook engine by calling the CLI from its shell.
|
|
|
124
124
|
|
|
125
125
|
<br/>
|
|
126
126
|
|
|
127
|
-
## ◆ Staying up to date
|
|
127
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> Staying up to date
|
|
128
128
|
|
|
129
129
|
speclaw checks for new releases in the background (at most once a day) and nudges
|
|
130
130
|
you when one lands. To upgrade:
|
|
@@ -143,7 +143,7 @@ packs this project already uses.
|
|
|
143
143
|
|
|
144
144
|
<br/>
|
|
145
145
|
|
|
146
|
-
## ◆ Requirements
|
|
146
|
+
## <img src="https://raw.githubusercontent.com/esneiderbravo/speclaw/main/brand/diamond.png" height="20" alt="◆" align="absmiddle"> Requirements
|
|
147
147
|
|
|
148
148
|
- **Node.js ≥ 22** — uses the built-in `node:sqlite`.
|
|
149
149
|
- **No native builds, no services, no API keys, no LLM download.** Tree-sitter
|
|
@@ -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
|
-
|
|
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/dist/shared/agents.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import { ensureGitignore } from "./install.js";
|
|
3
4
|
/** The agents speclaw can configure. Add one here and the CLI picks it up. */
|
|
4
5
|
export const AGENTS = [
|
|
5
6
|
{ id: "claude", label: "Claude Code", ideDir: ".claude", linkTargets: ["skills", "commands", "agents"], mcpFile: ".mcp.json" },
|
|
@@ -30,6 +31,10 @@ function isSymlink(p) {
|
|
|
30
31
|
}
|
|
31
32
|
/** Register the speclaw stdio MCP server in an agent's config file, merging into any existing config and skipping if already present. */
|
|
32
33
|
function writeMcpConfig(projectPath, mcpFile, report) {
|
|
34
|
+
// The agent MCP config is per-developer wiring — regenerated by `speclaw init`
|
|
35
|
+
// / `agent add`, points at a local runner — not shared source. Keep it out of
|
|
36
|
+
// version control (done regardless of whether we write or skip the file below).
|
|
37
|
+
ensureGitignore(projectPath, mcpFile, "speclaw agent MCP config (per-developer; regenerated by init)", report);
|
|
33
38
|
const mcpPath = path.join(projectPath, mcpFile);
|
|
34
39
|
let config = {};
|
|
35
40
|
if (fs.existsSync(mcpPath))
|