@namewta/speculo 0.6.1 → 0.7.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @namewta/speculo
2
2
 
3
- > Workflow-packaged specification-driven development assets with install, update, and migration tooling.
3
+ > Workflow-packaged specification-driven development assets with state-safe refresh tooling.
4
4
 
5
5
  Speculo packages AI coding workflows as installable assets — commands, skills, workflow packages — delivered into any project via a unified CLI.
6
6
 
@@ -10,12 +10,9 @@ Speculo packages AI coding workflows as installable assets — commands, skills,
10
10
  # Initialize Speculo in a target project
11
11
  npx @namewta/speculo init
12
12
 
13
- # Install all workflow packages
14
- npx @namewta/speculo init --all
15
-
16
13
  # Global install
17
14
  npm install -g @namewta/speculo
18
- speculo init [--all] [target]
15
+ speculo init [target]
19
16
  ```
20
17
 
21
18
  After initialization, the target project's `speculo/` directory contains all core assets and selected workflow packages.
@@ -32,16 +29,16 @@ Requires: Node.js ≥ 22.22.3
32
29
 
33
30
  | Command | Description |
34
31
  |---|---|
35
- | `speculo init [--all] [target]` | Install or refresh Speculo core assets and selected workflow packages. Existing `speculo/.speculo/` state is never overwritten. Projects with SpecDev installed also get an idempotent `specdev-worktree/` entry in the project-root `.gitignore`. |
36
- | `speculo migrate [--apply] [target]` | Preview (or apply) migration from v2, transitional v3, or SpecDev global status v3 state to the current contract. Dry-run by default; `--apply` performs the staged, rollback-safe migration. |
37
- | `speculo mirror-skills [--dry-run] [target]` | Mirror `.agents/skills/*` canonical skills into `.claude/skills/*` pointers; preview without writes with `--dry-run`. |
38
- | `speculo update` | Deprecated. Delegates to `speculo init --all`. |
32
+ | `speculo` / `speculo init [target]` | Initialize or refresh Speculo. Static commands, skills, and selected workflow packages come from the current template; compatible v0.7+ project configuration and complete workflow/command runtime state are migrated. Every refresh retains the previous configuration and runtime state in `speculo/.speculo/back/`. Incompatible or damaged state produces a clean active installation plus a pending migration marker and exits with code `2`. Projects with SpecDev installed also get idempotent `specdev-worktree/` and backup entries in the project-root `.gitignore`. |
33
+ | `speculo version` | Print the installed version and check npm for the latest release. |
34
+
35
+ Legacy CLI commands `migrate`, `mirror-skills`, and `update`, plus their flags, remain removed. The CLI still exposes only `init` and `version`. When `init` reports pending migration, run the installed Agent command `migrate-runtime-state`; it inventories the read-only backup, writes a dry-run report, requires explicit confirmation for the complete plan, and applies it through staging with rollback.
39
36
 
40
37
  ## Installed Runtime Assets
41
38
 
42
39
  After initialization, the target project gains the following AI agent-callable assets:
43
40
 
44
- ### 6 Commands
41
+ ### 7 Commands
45
42
 
46
43
  | Command | Purpose |
47
44
  |---|---|
@@ -49,16 +46,18 @@ After initialization, the target project gains the following AI agent-callable a
49
46
  | `archive-and-consolidate` | Knowledge lifecycle governance: archive stale content, consolidate scattered knowledge, clean up outdated assets |
50
47
  | `git-repository-audit` | Read-only, reproducible audit of one or more local Git repositories |
51
48
  | `handoff` | Persist a compact, resumable context handoff for another agent |
49
+ | `migrate-runtime-state` | Reconcile a pending runtime backup and atomically apply an explicitly confirmed migration plan |
52
50
  | `retro` | Retrospective analysis with `gh issue` creation |
53
51
  | `status` | Summary of installed workflows, active changes, and anomalies |
54
52
 
55
- ### 6 Skills
53
+ ### 7 Skills
56
54
 
57
55
  | Skill | Purpose |
58
56
  |---|---|
59
57
  | `archive-and-consolidate` | Archive stale content, consolidate scattered knowledge, and clean up outdated assets |
60
58
  | `docs-sync` | Documentation audit plus incremental or full AGENTS.md / CLAUDE.md handbook synchronization |
61
59
  | `github-npm-ops` | GitHub issue/PR triage and npm operations |
60
+ | `migrate-runtime-state` | Validate backups, lock source/target fingerprints, and apply runtime migration plans with rollback |
62
61
  | `speculo-retro` | Retrospective analysis |
63
62
  | `typescript-standards-builder` | Interview-driven generator that produces a project-specific TypeScript/JS/React/Node standards skill |
64
63
  | `writing-great-skills` | Authoring guidance for agent skills |
@@ -89,7 +88,7 @@ Speculo stands on the shoulders of pioneers — including our own failures. With
89
88
  - **[OpenSpec](https://github.com/Fission-AI/OpenSpec)** — a lightweight spec-driven development framework whose changes/ directory structure and archive mechanism deeply influenced Speculo's persistence contract design.
90
89
  - **[Superpowers](https://github.com/obra/superpowers)** — a complete agentic development methodology whose skill orchestration and subagent dispatch provided key reference for workflow package design.
91
90
 
92
- Speculo synthesizes lessons from all: from failure we learned "documents are the interface"; from Matt we inherited skill methodology; from OpenSpec we adopted engineering management; from Superpowers we studied orchestration. Together they form package-based workflow management, persistence contracts, and a unified install/migrate lifecycle. We carry their spirit forward.
91
+ Speculo synthesizes lessons from all: from failure we learned "documents are the interface"; from Matt we inherited skill methodology; from OpenSpec we adopted engineering management; from Superpowers we studied orchestration. Together they form package-based workflow management, persistence contracts, and a state-safe refresh lifecycle. We carry their spirit forward.
93
92
 
94
93
  ## License
95
94
 
package/dist/src/cli.js CHANGED
@@ -2,30 +2,18 @@
2
2
  import { dirname, resolve } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { initSpeculo } from "./index.js";
5
- import { migrateSpeculo } from "./migrate.js";
6
- import { mirrorSkills } from "./skills-mirror.js";
7
- import { checkForUpdate, formatVersionBanner, } from "./version.js";
5
+ import { checkForUpdate, formatVersionBanner } from "./version.js";
6
+ const REMOVED_COMMANDS = new Set(["migrate", "mirror-skills", "update"]);
7
+ const REMOVED_OPTIONS = new Set(["--all", "--apply", "--dry-run"]);
8
8
  function usage() {
9
9
  return [
10
10
  "Usage:",
11
- " speculo init [--all] [target]",
12
- " speculo migrate [--apply] [target]",
13
- " speculo mirror-skills [--dry-run] [target]",
11
+ " speculo [init] [target]",
14
12
  " speculo version",
15
13
  "",
16
14
  "Commands:",
17
- " init Install or refresh Speculo core assets and selected workflow packages.",
18
- " Existing workflow state under speculo/.speculo/ is never overwritten.",
19
- " migrate Preview migration from v2, transitional v3, or SpecDev status v3 state.",
20
- " Pass --apply to perform the staged, rollback-safe migration.",
21
- " mirror-skills Mirror .agents/skills/* canonical skills into .claude/skills/* pointers.",
22
- " Idempotent; relocates full .claude skills into .agents canonical first.",
23
- " version Print the current Speculo version and check for updates.",
24
- "",
25
- "Options:",
26
- " --all Select every workflow and fully refresh all assets during init.",
27
- " --apply Apply a migration; without this flag migrate is always dry-run.",
28
- " --dry-run Preview mirror-skills actions without writing to disk.",
15
+ " init Install or directly refresh Speculo assets and selected workflow packages.",
16
+ " version Print the current Speculo version and check for updates.",
29
17
  ].join("\n");
30
18
  }
31
19
  function isInteractive() {
@@ -37,132 +25,64 @@ async function showVersionWithCheck(packageRoot, packageName) {
37
25
  return info;
38
26
  }
39
27
  async function confirmContinue() {
40
- if (!isInteractive()) {
28
+ if (!isInteractive())
41
29
  return true;
42
- }
43
30
  const { confirm } = await import("@inquirer/prompts");
44
- return confirm({
45
- message: "是否继续运行 speculo init?",
46
- default: true,
47
- });
31
+ return confirm({ message: "是否继续运行 speculo init?", default: true });
32
+ }
33
+ function assertNoRemovedOption(argv) {
34
+ const option = argv.find((argument) => REMOVED_OPTIONS.has(argument));
35
+ if (option)
36
+ throw new Error(option + " has been removed. Run speculo init [target] to refresh Speculo.");
48
37
  }
49
38
  async function main(argv) {
50
- const allFlag = argv.includes("--all");
51
- const applyFlag = argv.includes("--apply");
52
- const dryRunFlag = argv.includes("--dry-run");
53
- const positional = argv.filter((argument) => argument !== "--all" &&
54
- argument !== "--apply" &&
55
- argument !== "--dry-run");
56
- const [command, targetArg, extra] = positional;
57
- if (command === "--help" || command === "-h") {
39
+ if (argv[0] === "--help" || argv[0] === "-h") {
58
40
  console.log(usage());
59
41
  return 0;
60
42
  }
61
- if (extra) {
62
- console.error("Unexpected argument: " + extra);
63
- console.error(usage());
43
+ const [command, ...rest] = argv;
44
+ if (command && REMOVED_COMMANDS.has(command)) {
45
+ console.error("speculo " + command + " has been removed. Run speculo init [target] to refresh Speculo.");
64
46
  return 1;
65
47
  }
66
- const target = resolve(targetArg ?? ".");
67
- const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
68
- const packageName = "@namewta/speculo";
69
48
  try {
70
- // ── version ──────────────────────────────────────────────
49
+ assertNoRemovedOption(argv);
50
+ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
51
+ const packageName = "@namewta/speculo";
71
52
  if (command === "version") {
53
+ if (rest.length > 0)
54
+ throw new Error("speculo version does not accept arguments.");
72
55
  await showVersionWithCheck(packageRoot, packageName);
73
56
  return 0;
74
57
  }
75
- // ── init (or no command default to init) ───────────────
76
- if (!command || command === "init") {
77
- if (applyFlag) {
78
- throw new Error("--apply is only valid with `speculo migrate`.");
79
- }
80
- // Show version info and check for updates
81
- await showVersionWithCheck(packageRoot, packageName);
82
- // Confirm before proceeding
83
- const proceed = await confirmContinue();
84
- if (!proceed) {
85
- console.log("已取消。");
86
- return 0;
87
- }
88
- const result = await initSpeculo(targetArg ?? ".", {
89
- packageRoot,
90
- all: command === "init" ? allFlag : false,
91
- });
92
- console.log(result.mode === "init"
93
- ? "Speculo initialized in " + result.target
94
- : "Speculo updated in " + result.target);
95
- for (const item of result.copied ?? result.updated ?? []) {
96
- console.log(" " + (result.mode === "init" ? "copied " : "updated ") + item);
97
- }
58
+ const targetArg = command === "init" ? rest[0] : command;
59
+ const extra = command === "init" ? rest[1] : rest[0];
60
+ if (extra)
61
+ throw new Error("Unexpected argument: " + extra);
62
+ if (targetArg?.startsWith("-"))
63
+ throw new Error("Unknown option: " + targetArg);
64
+ await showVersionWithCheck(packageRoot, packageName);
65
+ if (!(await confirmContinue())) {
66
+ console.log("已取消。");
98
67
  return 0;
99
68
  }
100
- // ── migrate ──────────────────────────────────────────────
101
- if (command === "migrate") {
102
- if (allFlag) {
103
- throw new Error("--all is only valid with `speculo init`.");
104
- }
105
- const result = await migrateSpeculo(target, {
106
- packageRoot,
107
- apply: applyFlag,
108
- });
109
- if (!result.legacyDetected) {
110
- console.log("No Speculo state migration required in " + result.target);
111
- return 0;
112
- }
113
- console.log(result.applied
114
- ? "Speculo state migrated in " + result.target
115
- : "Speculo migration preview for " + result.target);
116
- for (const action of result.actions) {
117
- const mapping = action.from
118
- ? action.from + (action.to ? " -> " + action.to : "")
119
- : action.detail;
120
- console.log(" " + action.kind + " " + mapping);
121
- }
122
- if (!result.applied) {
123
- console.log("Dry-run only. Re-run with --apply to perform this migration.");
124
- }
125
- return 0;
69
+ const result = await initSpeculo(targetArg ?? ".", { packageRoot });
70
+ console.log(result.mode === "init" ? "Speculo initialized in " + result.target : "Speculo refreshed in " + result.target);
71
+ for (const asset of result.assets)
72
+ console.log(" refreshed " + asset);
73
+ if (result.migration.status === "migrated") {
74
+ console.log(" migrated runtime state from " + result.migration.sourceVersion);
75
+ console.log(" retained backup " + result.migration.backupPath);
126
76
  }
127
- // ── mirror-skills ────────────────────────────────────────
128
- if (command === "mirror-skills") {
129
- if (allFlag) {
130
- throw new Error("--all is only valid with `speculo init`.");
131
- }
132
- if (applyFlag) {
133
- throw new Error("--apply is only valid with `speculo migrate`.");
134
- }
135
- const result = await mirrorSkills(targetArg ?? ".", {
136
- apply: !dryRunFlag,
137
- });
138
- console.log(result.applied
139
- ? "Skills mirrored in " + result.target
140
- : "Skills mirror preview for " + result.target);
141
- for (const action of result.actions) {
142
- console.log(" " + action.kind + " " + action.name +
143
- (action.detail ? " (" + action.detail + ")" : ""));
144
- }
145
- if (result.actions.length === 0) {
146
- console.log(" No skills found under .agents/skills or .claude/skills.");
147
- }
148
- if (!result.applied) {
149
- console.log("Dry-run only. Re-run without --dry-run to apply.");
77
+ if (result.migration.status === "pending") {
78
+ console.error("Speculo runtime migration is pending.");
79
+ for (const blocker of result.migration.blockers) {
80
+ console.error(" " + blocker.code + " " + blocker.path + ": " + blocker.message);
150
81
  }
151
- return 0;
152
- }
153
- // ── update (deprecated) ──────────────────────────────────
154
- if (command === "update") {
155
- console.error("Warning: `speculo update` is deprecated. Use `speculo init`.");
156
- const result = await initSpeculo(target, {
157
- packageRoot,
158
- all: true,
159
- });
160
- console.log("Speculo updated in " + result.target);
161
- return 0;
82
+ console.error("Run the migrate-runtime-state command before using Speculo workflows.");
83
+ return 2;
162
84
  }
163
- console.error("Unknown command: " + command);
164
- console.error(usage());
165
- return 1;
85
+ return 0;
166
86
  }
167
87
  catch (error) {
168
88
  console.error(error instanceof Error ? error.message : String(error));
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,cAAc,EACd,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,SAAS,KAAK;IACZ,OAAO;QACL,QAAQ;QACR,iCAAiC;QACjC,sCAAsC;QACtC,8CAA8C;QAC9C,mBAAmB;QACnB,EAAE;QACF,WAAW;QACX,yFAAyF;QACzF,wFAAwF;QACxF,0FAA0F;QAC1F,+EAA+E;QAC/E,2FAA2F;QAC3F,0FAA0F;QAC1F,2EAA2E;QAC3E,EAAE;QACF,UAAU;QACV,8EAA8E;QAC9E,8EAA8E;QAC9E,qEAAqE;KACtE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC;AACtC,CAAC;AAED,KAAK,UAAU,oBAAoB,CACjC,WAAmB,EACnB,WAAmB;IAEnB,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC5D,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC;IACvC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,eA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AC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAED,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1,13 +1,13 @@
1
+ import { type RuntimeMigrationResult } from "./migrations.js";
1
2
  import { type WorkflowSelection } from "./workflows.js";
2
3
  export type SpeculoCommandResult = {
3
4
  target: string;
4
- mode: "init" | "update";
5
- copied?: string[];
6
- updated?: string[];
5
+ mode: "init" | "refresh";
6
+ assets: string[];
7
+ migration: RuntimeMigrationResult;
7
8
  };
8
9
  export type SpeculoOptions = {
9
10
  packageRoot?: string;
10
- all?: boolean;
11
11
  selection?: WorkflowSelection;
12
12
  };
13
13
  export declare function initSpeculo(targetArg?: string, options?: SpeculoOptions): Promise<SpeculoCommandResult>;