@follenfang/wowdoc 0.0.3 → 0.0.5

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
@@ -13,24 +13,20 @@ The product is CLI-only. The included Agent Skill translates a natural-language
13
13
  ```powershell
14
14
  npm install -g @follenfang/wowdoc
15
15
  wowdoc --version
16
- wowdata --help
16
+ wowdoc --help
17
17
  ```
18
18
 
19
- The package installs:
20
-
21
- - `wowdoc`: read-only source queries and explicit source/index operations;
22
- - `wowdata`: local data initialization, update, cleanup, and uninstall;
23
- - the `wowdoc` Skill in `~/.agents/skills/wowdoc`.
19
+ The package installs the `wowdoc` CLI and the `wowdoc` Skill in `~/.agents/skills/wowdoc`. The single CLI handles queries, source/index operations, initialization, updates, cleanup, and uninstall.
24
20
 
25
21
  Run the one-time data initialization before querying source:
26
22
 
27
23
  ```powershell
28
- wowdata init
24
+ wowdoc init
29
25
  ```
30
26
 
31
27
  Initialization creates `~/.wowdoc`, fetches the configured Git mirrors, and builds searchable SQLite snapshots for each product branch and its hot Tags. It can take time and substantial disk space. The command is resumable: rerunning it keeps completed work and continues failed or pending snapshots.
32
28
 
33
- If Git is missing, `wowdata init` detects the platform package manager, shows the exact package and installer command, installs Git, refreshes `PATH`, and verifies `git --version`. `wowdoc doctor` remains read-only.
29
+ If Git is missing, `wowdoc init` detects the platform package manager, shows the exact package and installer command, installs Git, refreshes `PATH`, and verifies `git --version`. `wowdoc doctor` remains read-only.
34
30
 
35
31
  ## Supported source
36
32
 
@@ -86,8 +82,7 @@ wowdoc query|explore|inspect|diff|validate
86
82
  wowdoc source list|check|sync
87
83
  wowdoc index build|refresh|status
88
84
  wowdoc doctor
89
-
90
- wowdata init|update|clean|uninstall
85
+ wowdoc init|update|clean|uninstall
91
86
  ```
92
87
 
93
88
  Common lifecycle:
@@ -103,10 +98,10 @@ wowdoc source sync --source elvui --product main
103
98
  wowdoc index refresh --source elvui --product main --ref latest
104
99
 
105
100
  # Preview cleanup; no files are deleted
106
- wowdata clean
101
+ wowdoc clean
107
102
  ```
108
103
 
109
- Use `wowdata clean --apply` only after reviewing its candidates. Removing indexed versions requires an explicit version or range. `wowdata uninstall` requires confirmation and removes the npm package, managed Skill, and `~/.wowdoc` data.
104
+ Use `wowdoc clean --yes` only after reviewing its candidates. Removing indexed versions requires an explicit version or range. `wowdoc uninstall` requires confirmation and removes the npm package, managed Skill, and `~/.wowdoc` data.
110
105
 
111
106
  ## Storage model
112
107
 
@@ -114,7 +109,7 @@ Local state lives under `~/.wowdoc`:
114
109
 
115
110
  ```text
116
111
  config/ versioned source catalog and local configuration
117
- repositories/ bare partial Git mirrors
112
+ repositories/ complete bare Git mirrors
118
113
  objects/ content-addressed source and asset bytes
119
114
  ast/ auditable per-file JSON syntax trees
120
115
  indexes/ one WAL SQLite database per product branch
@@ -131,7 +126,7 @@ Each parser task fixes the requested ref to a Commit and creates its own detache
131
126
 
132
127
  The installed Skill contains source/product aliases and command-selection rules, not copied source facts. An Agent chooses the source, product, ref, topic, and narrowest useful identifier, then cites the CLI evidence. A missing exact plugin Tag can fall back to that product branch's latest snapshot only when the Skill labels the result as a latest fallback and preserves the originally requested version.
133
128
 
134
- The quality suite contains 50 realistic AddOn-author questions across all configured product branches and historical Tags. A strict pass requires the first reference to be correct, relevant, context-complete, version-correct, and byte-for-byte traceable to the resolved Git blob. The current report is in [`quality/report.md`](quality/report.md).
129
+ The quality suite contains 50 realistic AddOn-author questions across all configured product branches and historical Tags. A strict pass requires the first reference to be correct, relevant, context-complete, version-correct, and byte-for-byte traceable to the resolved Git blob. Local scenarios and generated reports live in the Git-ignored `analyze/quality` directory.
135
130
 
136
131
  ## Development
137
132
 
@@ -142,10 +137,9 @@ go test ./...
142
137
  go vet ./...
143
138
  npm pack --dry-run
144
139
  go run ./cmd/wowdoc --help
145
- go run ./cmd/wowdata --help
146
140
  ```
147
141
 
148
- Release tags use `vMAJOR.MINOR.PATCH`. GitHub Actions tests the project, builds `wowdoc` and `wowdata` for Windows amd64, Linux amd64/arm64, and macOS amd64/arm64, publishes checksums and a GitHub Release, then publishes the matching npm version through npm Trusted Publisher OIDC with provenance.
142
+ Release tags use `vMAJOR.MINOR.PATCH`. GitHub Actions tests the project, builds `wowdoc` for Windows amd64, Linux amd64/arm64, and macOS amd64/arm64, publishes checksums and a GitHub Release, then publishes the matching npm version through npm Trusted Publisher OIDC with provenance.
149
143
 
150
144
  ## License
151
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@follenfang/wowdoc",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Auditable WoW UI source intelligence CLI for coding agents",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,8 +9,7 @@
9
9
  "url": "https://github.com/Follen/wowdoc"
10
10
  },
11
11
  "bin": {
12
- "wowdoc": "bin/wowdoc.mjs",
13
- "wowdata": "bin/wowdata.mjs"
12
+ "wowdoc": "bin/wowdoc.mjs"
14
13
  },
15
14
  "files": [
16
15
  "bin/",
@@ -1,4 +1,10 @@
1
- import { existsSync } from "node:fs";
2
- for (const path of ["bin/wowdoc.mjs", "bin/wowdata.mjs", "scripts/install.mjs", "skill/SKILL.md"]) {
1
+ import { existsSync, readFileSync } from "node:fs";
2
+
3
+ for (const path of ["bin/wowdoc.mjs", "scripts/install.mjs", "skill/SKILL.md"]) {
3
4
  if (!existsSync(new URL(`../${path}`, import.meta.url))) throw new Error(`package file missing: ${path}`);
4
5
  }
6
+
7
+ const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
8
+ if (JSON.stringify(pkg.bin) !== JSON.stringify({ wowdoc: "bin/wowdoc.mjs" })) {
9
+ throw new Error("package must expose only the wowdoc executable");
10
+ }
@@ -4,7 +4,8 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
4
  import { join, resolve } from "node:path";
5
5
 
6
6
  const root = resolve(import.meta.dirname, "..");
7
- const scenarios = JSON.parse(readFileSync(join(root, "quality", "scenarios.json"), "utf8"));
7
+ const qualityDir = join(root, "analyze", "quality");
8
+ const scenarios = JSON.parse(readFileSync(join(qualityDir, "scenarios.json"), "utf8"));
8
9
  const home = process.env.WOWDOC_HOME;
9
10
  if (!home) throw new Error("WOWDOC_HOME is required so quality data stays isolated");
10
11
  const suffix = process.platform === "win32" ? ".exe" : "";
@@ -45,9 +46,9 @@ for (const [index, scenario] of scenarios.entries()) {
45
46
 
46
47
  const summary = summarize(results);
47
48
  const artifact = { schema: "wowdoc.quality.v1", generatedAt: new Date().toISOString(), home, summary, results };
48
- mkdirSync(join(root, "quality"), { recursive: true });
49
- writeFileSync(join(root, "quality", "results.json"), JSON.stringify(artifact, null, 2));
50
- writeFileSync(join(root, "quality", "report.md"), markdown(artifact));
49
+ mkdirSync(qualityDir, { recursive: true });
50
+ writeFileSync(join(qualityDir, "results.json"), JSON.stringify(artifact, null, 2));
51
+ writeFileSync(join(qualityDir, "report.md"), markdown(artifact));
51
52
  process.stdout.write(JSON.stringify(summary, null, 2) + "\n");
52
53
  process.exit(summary.passed === summary.total ? 0 : 1);
53
54
 
@@ -20,22 +20,21 @@ if (!platform) throw new Error(`unsupported_platform: ${process.platform}-${proc
20
20
  const nativeDir = join(root, "native");
21
21
  mkdirSync(nativeDir, { recursive: true });
22
22
 
23
- for (const name of ["wowdoc", "wowdata"]) {
24
- const target = join(nativeDir, name + suffix);
25
- const supplied = process.env.WOWDOC_BINARY_DIR && join(process.env.WOWDOC_BINARY_DIR, name + suffix);
26
- if (supplied && existsSync(supplied)) {
27
- cpSync(supplied, target);
28
- } else if (existsSync(join(root, "go.mod"))) {
29
- execFileSync("go", ["build", "-trimpath", "-ldflags", `-s -w -X github.com/follenfang/wowdoc/internal/app.Version=${pkg.version}`, "-o", target, `./cmd/${name}`], { cwd: root, stdio: "inherit" });
30
- } else {
31
- const asset = `${name}-${platform}${suffix}`;
32
- const url = `https://github.com/Follen/wowdoc/releases/download/v${pkg.version}/${asset}`;
33
- const response = await fetch(url, { redirect: "follow" });
34
- if (!response.ok) throw new Error(`binary_download_failed: ${response.status} ${url}`);
35
- writeFileSync(target, Buffer.from(await response.arrayBuffer()));
36
- }
37
- if (process.platform !== "win32") chmodSync(target, 0o755);
23
+ const name = "wowdoc";
24
+ const target = join(nativeDir, name + suffix);
25
+ const supplied = process.env.WOWDOC_BINARY_DIR && join(process.env.WOWDOC_BINARY_DIR, name + suffix);
26
+ if (supplied && existsSync(supplied)) {
27
+ cpSync(supplied, target);
28
+ } else if (existsSync(join(root, "go.mod"))) {
29
+ execFileSync("go", ["build", "-trimpath", "-ldflags", `-s -w -X github.com/follenfang/wowdoc/internal/app.Version=${pkg.version}`, "-o", target, `./cmd/${name}`], { cwd: root, stdio: "inherit" });
30
+ } else {
31
+ const asset = `${name}-${platform}${suffix}`;
32
+ const url = `https://github.com/Follen/wowdoc/releases/download/v${pkg.version}/${asset}`;
33
+ const response = await fetch(url, { redirect: "follow" });
34
+ if (!response.ok) throw new Error(`binary_download_failed: ${response.status} ${url}`);
35
+ writeFileSync(target, Buffer.from(await response.arrayBuffer()));
38
36
  }
37
+ if (process.platform !== "win32") chmodSync(target, 0o755);
39
38
 
40
39
  const skillSource = join(root, "skill");
41
40
  const skillTarget = join(homedir(), ".agents", "skills", "wowdoc");
package/bin/wowdata.mjs DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { run } from "./run.mjs";
3
- run("wowdata");