@x12i/xops-docs 0.1.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/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # `@x12i/xops-docs`
2
+
3
+ xops docs **knowledge SDK** — install as a **devDependency** only. It bundles
4
+ the xops catalog, use cases, and Markdown packs for humans and agents.
5
+
6
+ ```bash
7
+ npm i -D @x12i/xops-docs
8
+ ```
9
+
10
+ ```ts
11
+ import { xopsDocs } from "@x12i/xops-docs";
12
+
13
+ xopsDocs.listBooks();
14
+ xopsDocs.getBookMarkdown("01-install-and-daily", "developers");
15
+ xopsDocs.getUseCaseMarkdown("run-a-safe-release");
16
+ xopsDocs.manifest(); // agent-manifest for discovery
17
+ ```
18
+
19
+ CLI:
20
+
21
+ ```bash
22
+ xops-docs list-books
23
+ xops-docs list-use-cases
24
+ xops-docs book 00-platform-overview developers
25
+ xops-docs use-case orient-xops
26
+ ```
27
+
28
+ The embedded content is generated from `xops-docs/` by the platform build
29
+ (`npm run build`); do not edit `src/generated/`.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import("../dist/cli.js");
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+ import { xopsDocs } from "./index.js";
3
+ const [cmd, id, audience] = process.argv.slice(2);
4
+ function usage() {
5
+ console.error(`Usage:
6
+ xops-docs use-case <id> Print assembled use-case markdown
7
+ xops-docs book <id> <audience> Print book markdown
8
+ xops-docs list-use-cases List use case ids
9
+ xops-docs list-books List book ids
10
+ `);
11
+ }
12
+ if (!cmd || cmd === "help" || cmd === "--help") {
13
+ usage();
14
+ process.exit(cmd ? 0 : 1);
15
+ }
16
+ if (cmd === "list-use-cases") {
17
+ for (const uc of xopsDocs.listUseCases()) {
18
+ console.log(`${uc.id}\t${uc.title}`);
19
+ }
20
+ process.exit(0);
21
+ }
22
+ if (cmd === "list-books") {
23
+ for (const b of xopsDocs.listBooks()) {
24
+ console.log(`${b.id}\t${b.title}\t${b.audiences.join(",")}`);
25
+ }
26
+ process.exit(0);
27
+ }
28
+ if (cmd === "use-case") {
29
+ if (!id) {
30
+ usage();
31
+ process.exit(1);
32
+ }
33
+ const md = xopsDocs.getUseCaseMarkdown(id);
34
+ if (!md) {
35
+ console.error(`Unknown use case: ${id}`);
36
+ process.exit(1);
37
+ }
38
+ process.stdout.write(md);
39
+ process.exit(0);
40
+ }
41
+ if (cmd === "book") {
42
+ if (!id || !audience) {
43
+ usage();
44
+ process.exit(1);
45
+ }
46
+ const md = xopsDocs.getBookMarkdown(id, audience);
47
+ if (!md) {
48
+ console.error(`Unknown book/audience: ${id} ${audience}`);
49
+ process.exit(1);
50
+ }
51
+ process.stdout.write(md);
52
+ process.exit(0);
53
+ }
54
+ usage();
55
+ process.exit(1);
@@ -0,0 +1,345 @@
1
+ export declare const catalog: {
2
+ readonly roles: readonly [{
3
+ readonly id: "developers";
4
+ readonly label: "Developers";
5
+ readonly tagline: "Run xops every day";
6
+ readonly description: "Humans and coding agents who install, release, ask, and operate Node.js repositories through xops.";
7
+ }, {
8
+ readonly id: "builders";
9
+ readonly label: "Operators";
10
+ readonly tagline: "Set up PATH, CI, and the operating contract";
11
+ readonly description: "People who bootstrap the CLI, wire CI/agent hosts, and keep doctor/ops status green.";
12
+ }];
13
+ readonly families: readonly [{
14
+ readonly id: "xops";
15
+ readonly name: "xops";
16
+ readonly tagline: "The operating layer for Node.js repositories.";
17
+ readonly description: "Detects repo state, routes work to native owners, plans risky actions, executes approved workflows, and reports what happened — via CLI, SDK, and MCP.";
18
+ readonly color: "#1a2f45";
19
+ }];
20
+ readonly books: readonly [{
21
+ readonly id: "00-platform-overview";
22
+ readonly familyId: "xops";
23
+ readonly audiences: readonly ["developers", "builders"];
24
+ readonly status: "available";
25
+ readonly kicker: "CASE FILE · XOPS-00";
26
+ readonly title: "Platform Overview";
27
+ readonly subtitle: "Mental model and surfaces";
28
+ readonly blurb: "What xops is, the operating contract, three interfaces, and which book to open next.";
29
+ readonly tags: readonly ["platform", "start-here"];
30
+ readonly color: "#1a2f45";
31
+ readonly dir: "00-platform-overview";
32
+ }, {
33
+ readonly id: "01-install-and-daily";
34
+ readonly familyId: "xops";
35
+ readonly audiences: readonly ["developers"];
36
+ readonly status: "available";
37
+ readonly kicker: "CASE FILE · XOPS-01";
38
+ readonly title: "Install and Daily CLI";
39
+ readonly subtitle: "Get xops on PATH and use it every day";
40
+ readonly blurb: "Global install, doctor, workspace install-once, and the daily command surface.";
41
+ readonly tags: readonly ["install", "cli", "workspaces"];
42
+ readonly color: "#b14a2c";
43
+ readonly dir: "01-install-and-daily";
44
+ }, {
45
+ readonly id: "02-release-and-publish";
46
+ readonly familyId: "xops";
47
+ readonly audiences: readonly ["developers"];
48
+ readonly status: "available";
49
+ readonly kicker: "CASE FILE · XOPS-02";
50
+ readonly title: "Release and Publish";
51
+ readonly subtitle: "The original wedge";
52
+ readonly blurb: "Discovery, dependency order, safety, publish, push, and undo for humans and agents.";
53
+ readonly tags: readonly ["release", "publish", "safety"];
54
+ readonly color: "#1f6e5c";
55
+ readonly dir: "02-release-and-publish";
56
+ }, {
57
+ readonly id: "03-cli-sdk-mcp";
58
+ readonly familyId: "xops";
59
+ readonly audiences: readonly ["developers"];
60
+ readonly status: "available";
61
+ readonly kicker: "CASE FILE · XOPS-03";
62
+ readonly title: "CLI, SDK, and MCP";
63
+ readonly subtitle: "One contract, three interfaces";
64
+ readonly blurb: "Ask, typed SDK results, MCP tools/resources, and plan-first approvals for agents.";
65
+ readonly tags: readonly ["sdk", "mcp", "ask", "agents"];
66
+ readonly color: "#a5710f";
67
+ readonly dir: "03-cli-sdk-mcp";
68
+ }, {
69
+ readonly id: "04-ops-and-tools";
70
+ readonly familyId: "xops";
71
+ readonly audiences: readonly ["builders"];
72
+ readonly status: "available";
73
+ readonly kicker: "CASE FILE · XOPS-04";
74
+ readonly title: "Ops and Tools";
75
+ readonly subtitle: "Catalog, recommendations, playbooks";
76
+ readonly blurb: "ops status, recommendations, seamless tools, and operational playbooks.";
77
+ readonly tags: readonly ["ops", "tools", "playbooks"];
78
+ readonly color: "#2c5f7a";
79
+ readonly dir: "04-ops-and-tools";
80
+ readonly buildersPrimary: true;
81
+ }, {
82
+ readonly id: "05-agents-and-safety";
83
+ readonly familyId: "xops";
84
+ readonly audiences: readonly ["developers"];
85
+ readonly status: "available";
86
+ readonly kicker: "CASE FILE · XOPS-05";
87
+ readonly title: "Agents and Safety";
88
+ readonly subtitle: "Agent packs, gitignore, publish safety";
89
+ readonly blurb: "AI context packs, safety gates, and how agents should call xops without scraping terminals.";
90
+ readonly tags: readonly ["agents", "safety", "ai-pack"];
91
+ readonly color: "#4a3f6b";
92
+ readonly dir: "05-agents-and-safety";
93
+ }];
94
+ };
95
+ export declare const useCases: {
96
+ readonly useCases: readonly [{
97
+ readonly id: "orient-xops";
98
+ readonly title: "Orient on xops";
99
+ readonly goal: "Understand the operating layer, three interfaces, and which book to open next.";
100
+ readonly audiences: readonly ["developers", "builders"];
101
+ readonly tags: readonly ["platform", "start-here"];
102
+ readonly path: readonly [{
103
+ readonly bookId: "00-platform-overview";
104
+ readonly audience: "developers";
105
+ readonly chapters: readonly ["the-mental-model", "one-contract-three-interfaces", "what-xops-owns", "hard-product-rules", "which-book-next"];
106
+ }];
107
+ readonly alsoSee: readonly ["00-platform-overview"];
108
+ }, {
109
+ readonly id: "install-and-doctor";
110
+ readonly title: "Install xops and run doctor";
111
+ readonly goal: "Get @x12i/xops on PATH, confirm shims, and clear doctor checks.";
112
+ readonly audiences: readonly ["developers", "builders"];
113
+ readonly tags: readonly ["install", "doctor"];
114
+ readonly path: readonly [{
115
+ readonly bookId: "01-install-and-daily";
116
+ readonly audience: "developers";
117
+ readonly chapters: readonly ["install-the-cli", "confirm-on-path", "run-doctor", "workspace-install-once"];
118
+ }];
119
+ readonly alsoSee: readonly ["01-install-and-daily", "04-ops-and-tools"];
120
+ }, {
121
+ readonly id: "run-a-safe-release";
122
+ readonly title: "Run a safe release";
123
+ readonly goal: "Plan, approve, publish, and undo a monorepo or single-package release.";
124
+ readonly audiences: readonly ["developers"];
125
+ readonly tags: readonly ["release", "publish"];
126
+ readonly path: readonly [{
127
+ readonly bookId: "02-release-and-publish";
128
+ readonly audience: "developers";
129
+ readonly chapters: readonly ["discovery-and-order", "safety-gates", "publish-and-push", "undo-and-recovery"];
130
+ }];
131
+ readonly alsoSee: readonly ["02-release-and-publish", "05-agents-and-safety"];
132
+ }, {
133
+ readonly id: "wire-sdk-or-mcp";
134
+ readonly title: "Wire the SDK or MCP";
135
+ readonly goal: "Call the same operating layer from TypeScript or an MCP host with plan-first approvals.";
136
+ readonly audiences: readonly ["developers"];
137
+ readonly tags: readonly ["sdk", "mcp", "agents"];
138
+ readonly path: readonly [{
139
+ readonly bookId: "03-cli-sdk-mcp";
140
+ readonly audience: "developers";
141
+ readonly chapters: readonly ["ask-and-passthrough", "typed-sdk-results", "mcp-tools-and-resources", "plan-first-approvals"];
142
+ }];
143
+ readonly alsoSee: readonly ["03-cli-sdk-mcp", "05-agents-and-safety"];
144
+ }, {
145
+ readonly id: "operate-the-tool-catalog";
146
+ readonly title: "Operate the tool catalog";
147
+ readonly goal: "Read ops status, apply recommendations, and run playbooks without inventing a second ops stack.";
148
+ readonly audiences: readonly ["builders"];
149
+ readonly tags: readonly ["ops", "tools", "playbooks"];
150
+ readonly path: readonly [{
151
+ readonly bookId: "04-ops-and-tools";
152
+ readonly audience: "builders";
153
+ readonly chapters: readonly ["ops-status", "recommendations", "seamless-tools", "playbooks"];
154
+ }];
155
+ readonly alsoSee: readonly ["04-ops-and-tools", "00-platform-overview"];
156
+ }, {
157
+ readonly id: "brief-a-coding-agent";
158
+ readonly title: "Brief a coding agent";
159
+ readonly goal: "Generate AI context packs and teach an agent to use xops safely.";
160
+ readonly audiences: readonly ["developers"];
161
+ readonly tags: readonly ["agents", "ai-pack", "safety"];
162
+ readonly path: readonly [{
163
+ readonly bookId: "05-agents-and-safety";
164
+ readonly audience: "developers";
165
+ readonly chapters: readonly ["ai-packs", "agent-call-shape", "publish-and-secret-safety", "knowledge-sdk"];
166
+ }];
167
+ readonly alsoSee: readonly ["05-agents-and-safety", "03-cli-sdk-mcp"];
168
+ }];
169
+ };
170
+ export declare const site: {
171
+ readonly product: "xops";
172
+ readonly brand: "xops · docs";
173
+ readonly brandAccent: "docs";
174
+ readonly siteUrl: "https://docs.xops.x12i.com";
175
+ readonly knowledgePackage: "@x12i/xops-docs";
176
+ readonly footer: "XOPS FIELD GUIDES · OPERATING LAYER";
177
+ readonly accent: "oklch(42% 0.09 250)";
178
+ readonly accentAlt: "oklch(52% 0.11 35)";
179
+ readonly productUrl: "https://github.com/x12i/npm";
180
+ readonly nav: readonly [{
181
+ readonly label: "Getting started";
182
+ readonly href: "/getting-started";
183
+ }, {
184
+ readonly label: "Use cases";
185
+ readonly href: "/use-cases";
186
+ }, {
187
+ readonly label: "Catalog";
188
+ readonly href: "/catalog";
189
+ }];
190
+ readonly footerLinks: readonly [{
191
+ readonly label: "Docs home";
192
+ readonly href: "/docs";
193
+ }, {
194
+ readonly label: "Getting started";
195
+ readonly href: "/getting-started";
196
+ }, {
197
+ readonly label: "Use cases";
198
+ readonly href: "/use-cases";
199
+ }, {
200
+ readonly label: "Catalog";
201
+ readonly href: "/catalog";
202
+ }, {
203
+ readonly label: "Agents/SDK";
204
+ readonly href: "/agents";
205
+ }];
206
+ };
207
+ export declare const manifest: {
208
+ readonly version: 1;
209
+ readonly product: "xops";
210
+ readonly site: "https://docs.xops.x12i.com";
211
+ readonly knowledgePackage: "@x12i/xops-docs";
212
+ readonly roles: readonly ["developers", "builders"];
213
+ readonly books: readonly [{
214
+ readonly id: "00-platform-overview";
215
+ readonly audiences: readonly ["developers", "builders"];
216
+ readonly md: {
217
+ readonly developers: "downloads/books/00-platform-overview/developers.md";
218
+ readonly builders: "downloads/books/00-platform-overview/builders.md";
219
+ };
220
+ readonly pdf: {
221
+ readonly developers: null;
222
+ readonly builders: null;
223
+ };
224
+ readonly chapters: {
225
+ readonly developers: "downloads/books/00-platform-overview/developers.chapters.json";
226
+ readonly builders: "downloads/books/00-platform-overview/builders.chapters.json";
227
+ };
228
+ }, {
229
+ readonly id: "01-install-and-daily";
230
+ readonly audiences: readonly ["developers"];
231
+ readonly md: {
232
+ readonly developers: "downloads/books/01-install-and-daily/developers.md";
233
+ };
234
+ readonly pdf: {
235
+ readonly developers: null;
236
+ };
237
+ readonly chapters: {
238
+ readonly developers: "downloads/books/01-install-and-daily/developers.chapters.json";
239
+ };
240
+ }, {
241
+ readonly id: "02-release-and-publish";
242
+ readonly audiences: readonly ["developers"];
243
+ readonly md: {
244
+ readonly developers: "downloads/books/02-release-and-publish/developers.md";
245
+ };
246
+ readonly pdf: {
247
+ readonly developers: null;
248
+ };
249
+ readonly chapters: {
250
+ readonly developers: "downloads/books/02-release-and-publish/developers.chapters.json";
251
+ };
252
+ }, {
253
+ readonly id: "03-cli-sdk-mcp";
254
+ readonly audiences: readonly ["developers"];
255
+ readonly md: {
256
+ readonly developers: "downloads/books/03-cli-sdk-mcp/developers.md";
257
+ };
258
+ readonly pdf: {
259
+ readonly developers: null;
260
+ };
261
+ readonly chapters: {
262
+ readonly developers: "downloads/books/03-cli-sdk-mcp/developers.chapters.json";
263
+ };
264
+ }, {
265
+ readonly id: "04-ops-and-tools";
266
+ readonly audiences: readonly ["builders"];
267
+ readonly md: {
268
+ readonly builders: "downloads/books/04-ops-and-tools/builders.md";
269
+ };
270
+ readonly pdf: {
271
+ readonly builders: null;
272
+ };
273
+ readonly chapters: {
274
+ readonly builders: "downloads/books/04-ops-and-tools/builders.chapters.json";
275
+ };
276
+ }, {
277
+ readonly id: "05-agents-and-safety";
278
+ readonly audiences: readonly ["developers"];
279
+ readonly md: {
280
+ readonly developers: "downloads/books/05-agents-and-safety/developers.md";
281
+ };
282
+ readonly pdf: {
283
+ readonly developers: null;
284
+ };
285
+ readonly chapters: {
286
+ readonly developers: "downloads/books/05-agents-and-safety/developers.chapters.json";
287
+ };
288
+ }];
289
+ readonly useCases: readonly [{
290
+ readonly id: "orient-xops";
291
+ readonly title: "Orient on xops";
292
+ readonly md: "downloads/use-cases/orient-xops.md";
293
+ readonly path: readonly [{
294
+ readonly bookId: "00-platform-overview";
295
+ readonly audience: "developers";
296
+ readonly chapters: readonly ["the-mental-model", "one-contract-three-interfaces", "what-xops-owns", "hard-product-rules", "which-book-next"];
297
+ }];
298
+ }, {
299
+ readonly id: "install-and-doctor";
300
+ readonly title: "Install xops and run doctor";
301
+ readonly md: "downloads/use-cases/install-and-doctor.md";
302
+ readonly path: readonly [{
303
+ readonly bookId: "01-install-and-daily";
304
+ readonly audience: "developers";
305
+ readonly chapters: readonly ["install-the-cli", "confirm-on-path", "run-doctor", "workspace-install-once"];
306
+ }];
307
+ }, {
308
+ readonly id: "run-a-safe-release";
309
+ readonly title: "Run a safe release";
310
+ readonly md: "downloads/use-cases/run-a-safe-release.md";
311
+ readonly path: readonly [{
312
+ readonly bookId: "02-release-and-publish";
313
+ readonly audience: "developers";
314
+ readonly chapters: readonly ["discovery-and-order", "safety-gates", "publish-and-push", "undo-and-recovery"];
315
+ }];
316
+ }, {
317
+ readonly id: "wire-sdk-or-mcp";
318
+ readonly title: "Wire the SDK or MCP";
319
+ readonly md: "downloads/use-cases/wire-sdk-or-mcp.md";
320
+ readonly path: readonly [{
321
+ readonly bookId: "03-cli-sdk-mcp";
322
+ readonly audience: "developers";
323
+ readonly chapters: readonly ["ask-and-passthrough", "typed-sdk-results", "mcp-tools-and-resources", "plan-first-approvals"];
324
+ }];
325
+ }, {
326
+ readonly id: "operate-the-tool-catalog";
327
+ readonly title: "Operate the tool catalog";
328
+ readonly md: "downloads/use-cases/operate-the-tool-catalog.md";
329
+ readonly path: readonly [{
330
+ readonly bookId: "04-ops-and-tools";
331
+ readonly audience: "builders";
332
+ readonly chapters: readonly ["ops-status", "recommendations", "seamless-tools", "playbooks"];
333
+ }];
334
+ }, {
335
+ readonly id: "brief-a-coding-agent";
336
+ readonly title: "Brief a coding agent";
337
+ readonly md: "downloads/use-cases/brief-a-coding-agent.md";
338
+ readonly path: readonly [{
339
+ readonly bookId: "05-agents-and-safety";
340
+ readonly audience: "developers";
341
+ readonly chapters: readonly ["ai-packs", "agent-call-shape", "publish-and-secret-safety", "knowledge-sdk"];
342
+ }];
343
+ }];
344
+ };
345
+ export declare const files: Record<string, string>;
@@ -0,0 +1,605 @@
1
+ /* Auto-generated by scripts/build-knowledge.mjs — do not edit */
2
+ export const catalog = {
3
+ "roles": [
4
+ {
5
+ "id": "developers",
6
+ "label": "Developers",
7
+ "tagline": "Run xops every day",
8
+ "description": "Humans and coding agents who install, release, ask, and operate Node.js repositories through xops."
9
+ },
10
+ {
11
+ "id": "builders",
12
+ "label": "Operators",
13
+ "tagline": "Set up PATH, CI, and the operating contract",
14
+ "description": "People who bootstrap the CLI, wire CI/agent hosts, and keep doctor/ops status green."
15
+ }
16
+ ],
17
+ "families": [
18
+ {
19
+ "id": "xops",
20
+ "name": "xops",
21
+ "tagline": "The operating layer for Node.js repositories.",
22
+ "description": "Detects repo state, routes work to native owners, plans risky actions, executes approved workflows, and reports what happened — via CLI, SDK, and MCP.",
23
+ "color": "#1a2f45"
24
+ }
25
+ ],
26
+ "books": [
27
+ {
28
+ "id": "00-platform-overview",
29
+ "familyId": "xops",
30
+ "audiences": [
31
+ "developers",
32
+ "builders"
33
+ ],
34
+ "status": "available",
35
+ "kicker": "CASE FILE · XOPS-00",
36
+ "title": "Platform Overview",
37
+ "subtitle": "Mental model and surfaces",
38
+ "blurb": "What xops is, the operating contract, three interfaces, and which book to open next.",
39
+ "tags": [
40
+ "platform",
41
+ "start-here"
42
+ ],
43
+ "color": "#1a2f45",
44
+ "dir": "00-platform-overview"
45
+ },
46
+ {
47
+ "id": "01-install-and-daily",
48
+ "familyId": "xops",
49
+ "audiences": [
50
+ "developers"
51
+ ],
52
+ "status": "available",
53
+ "kicker": "CASE FILE · XOPS-01",
54
+ "title": "Install and Daily CLI",
55
+ "subtitle": "Get xops on PATH and use it every day",
56
+ "blurb": "Global install, doctor, workspace install-once, and the daily command surface.",
57
+ "tags": [
58
+ "install",
59
+ "cli",
60
+ "workspaces"
61
+ ],
62
+ "color": "#b14a2c",
63
+ "dir": "01-install-and-daily"
64
+ },
65
+ {
66
+ "id": "02-release-and-publish",
67
+ "familyId": "xops",
68
+ "audiences": [
69
+ "developers"
70
+ ],
71
+ "status": "available",
72
+ "kicker": "CASE FILE · XOPS-02",
73
+ "title": "Release and Publish",
74
+ "subtitle": "The original wedge",
75
+ "blurb": "Discovery, dependency order, safety, publish, push, and undo for humans and agents.",
76
+ "tags": [
77
+ "release",
78
+ "publish",
79
+ "safety"
80
+ ],
81
+ "color": "#1f6e5c",
82
+ "dir": "02-release-and-publish"
83
+ },
84
+ {
85
+ "id": "03-cli-sdk-mcp",
86
+ "familyId": "xops",
87
+ "audiences": [
88
+ "developers"
89
+ ],
90
+ "status": "available",
91
+ "kicker": "CASE FILE · XOPS-03",
92
+ "title": "CLI, SDK, and MCP",
93
+ "subtitle": "One contract, three interfaces",
94
+ "blurb": "Ask, typed SDK results, MCP tools/resources, and plan-first approvals for agents.",
95
+ "tags": [
96
+ "sdk",
97
+ "mcp",
98
+ "ask",
99
+ "agents"
100
+ ],
101
+ "color": "#a5710f",
102
+ "dir": "03-cli-sdk-mcp"
103
+ },
104
+ {
105
+ "id": "04-ops-and-tools",
106
+ "familyId": "xops",
107
+ "audiences": [
108
+ "builders"
109
+ ],
110
+ "status": "available",
111
+ "kicker": "CASE FILE · XOPS-04",
112
+ "title": "Ops and Tools",
113
+ "subtitle": "Catalog, recommendations, playbooks",
114
+ "blurb": "ops status, recommendations, seamless tools, and operational playbooks.",
115
+ "tags": [
116
+ "ops",
117
+ "tools",
118
+ "playbooks"
119
+ ],
120
+ "color": "#2c5f7a",
121
+ "dir": "04-ops-and-tools",
122
+ "buildersPrimary": true
123
+ },
124
+ {
125
+ "id": "05-agents-and-safety",
126
+ "familyId": "xops",
127
+ "audiences": [
128
+ "developers"
129
+ ],
130
+ "status": "available",
131
+ "kicker": "CASE FILE · XOPS-05",
132
+ "title": "Agents and Safety",
133
+ "subtitle": "Agent packs, gitignore, publish safety",
134
+ "blurb": "AI context packs, safety gates, and how agents should call xops without scraping terminals.",
135
+ "tags": [
136
+ "agents",
137
+ "safety",
138
+ "ai-pack"
139
+ ],
140
+ "color": "#4a3f6b",
141
+ "dir": "05-agents-and-safety"
142
+ }
143
+ ]
144
+ };
145
+ export const useCases = {
146
+ "useCases": [
147
+ {
148
+ "id": "orient-xops",
149
+ "title": "Orient on xops",
150
+ "goal": "Understand the operating layer, three interfaces, and which book to open next.",
151
+ "audiences": [
152
+ "developers",
153
+ "builders"
154
+ ],
155
+ "tags": [
156
+ "platform",
157
+ "start-here"
158
+ ],
159
+ "path": [
160
+ {
161
+ "bookId": "00-platform-overview",
162
+ "audience": "developers",
163
+ "chapters": [
164
+ "the-mental-model",
165
+ "one-contract-three-interfaces",
166
+ "what-xops-owns",
167
+ "hard-product-rules",
168
+ "which-book-next"
169
+ ]
170
+ }
171
+ ],
172
+ "alsoSee": [
173
+ "00-platform-overview"
174
+ ]
175
+ },
176
+ {
177
+ "id": "install-and-doctor",
178
+ "title": "Install xops and run doctor",
179
+ "goal": "Get @x12i/xops on PATH, confirm shims, and clear doctor checks.",
180
+ "audiences": [
181
+ "developers",
182
+ "builders"
183
+ ],
184
+ "tags": [
185
+ "install",
186
+ "doctor"
187
+ ],
188
+ "path": [
189
+ {
190
+ "bookId": "01-install-and-daily",
191
+ "audience": "developers",
192
+ "chapters": [
193
+ "install-the-cli",
194
+ "confirm-on-path",
195
+ "run-doctor",
196
+ "workspace-install-once"
197
+ ]
198
+ }
199
+ ],
200
+ "alsoSee": [
201
+ "01-install-and-daily",
202
+ "04-ops-and-tools"
203
+ ]
204
+ },
205
+ {
206
+ "id": "run-a-safe-release",
207
+ "title": "Run a safe release",
208
+ "goal": "Plan, approve, publish, and undo a monorepo or single-package release.",
209
+ "audiences": [
210
+ "developers"
211
+ ],
212
+ "tags": [
213
+ "release",
214
+ "publish"
215
+ ],
216
+ "path": [
217
+ {
218
+ "bookId": "02-release-and-publish",
219
+ "audience": "developers",
220
+ "chapters": [
221
+ "discovery-and-order",
222
+ "safety-gates",
223
+ "publish-and-push",
224
+ "undo-and-recovery"
225
+ ]
226
+ }
227
+ ],
228
+ "alsoSee": [
229
+ "02-release-and-publish",
230
+ "05-agents-and-safety"
231
+ ]
232
+ },
233
+ {
234
+ "id": "wire-sdk-or-mcp",
235
+ "title": "Wire the SDK or MCP",
236
+ "goal": "Call the same operating layer from TypeScript or an MCP host with plan-first approvals.",
237
+ "audiences": [
238
+ "developers"
239
+ ],
240
+ "tags": [
241
+ "sdk",
242
+ "mcp",
243
+ "agents"
244
+ ],
245
+ "path": [
246
+ {
247
+ "bookId": "03-cli-sdk-mcp",
248
+ "audience": "developers",
249
+ "chapters": [
250
+ "ask-and-passthrough",
251
+ "typed-sdk-results",
252
+ "mcp-tools-and-resources",
253
+ "plan-first-approvals"
254
+ ]
255
+ }
256
+ ],
257
+ "alsoSee": [
258
+ "03-cli-sdk-mcp",
259
+ "05-agents-and-safety"
260
+ ]
261
+ },
262
+ {
263
+ "id": "operate-the-tool-catalog",
264
+ "title": "Operate the tool catalog",
265
+ "goal": "Read ops status, apply recommendations, and run playbooks without inventing a second ops stack.",
266
+ "audiences": [
267
+ "builders"
268
+ ],
269
+ "tags": [
270
+ "ops",
271
+ "tools",
272
+ "playbooks"
273
+ ],
274
+ "path": [
275
+ {
276
+ "bookId": "04-ops-and-tools",
277
+ "audience": "builders",
278
+ "chapters": [
279
+ "ops-status",
280
+ "recommendations",
281
+ "seamless-tools",
282
+ "playbooks"
283
+ ]
284
+ }
285
+ ],
286
+ "alsoSee": [
287
+ "04-ops-and-tools",
288
+ "00-platform-overview"
289
+ ]
290
+ },
291
+ {
292
+ "id": "brief-a-coding-agent",
293
+ "title": "Brief a coding agent",
294
+ "goal": "Generate AI context packs and teach an agent to use xops safely.",
295
+ "audiences": [
296
+ "developers"
297
+ ],
298
+ "tags": [
299
+ "agents",
300
+ "ai-pack",
301
+ "safety"
302
+ ],
303
+ "path": [
304
+ {
305
+ "bookId": "05-agents-and-safety",
306
+ "audience": "developers",
307
+ "chapters": [
308
+ "ai-packs",
309
+ "agent-call-shape",
310
+ "publish-and-secret-safety",
311
+ "knowledge-sdk"
312
+ ]
313
+ }
314
+ ],
315
+ "alsoSee": [
316
+ "05-agents-and-safety",
317
+ "03-cli-sdk-mcp"
318
+ ]
319
+ }
320
+ ]
321
+ };
322
+ export const site = {
323
+ "product": "xops",
324
+ "brand": "xops · docs",
325
+ "brandAccent": "docs",
326
+ "siteUrl": "https://docs.xops.x12i.com",
327
+ "knowledgePackage": "@x12i/xops-docs",
328
+ "footer": "XOPS FIELD GUIDES · OPERATING LAYER",
329
+ "accent": "oklch(42% 0.09 250)",
330
+ "accentAlt": "oklch(52% 0.11 35)",
331
+ "productUrl": "https://github.com/x12i/npm",
332
+ "nav": [
333
+ {
334
+ "label": "Getting started",
335
+ "href": "/getting-started"
336
+ },
337
+ {
338
+ "label": "Use cases",
339
+ "href": "/use-cases"
340
+ },
341
+ {
342
+ "label": "Catalog",
343
+ "href": "/catalog"
344
+ }
345
+ ],
346
+ "footerLinks": [
347
+ {
348
+ "label": "Docs home",
349
+ "href": "/docs"
350
+ },
351
+ {
352
+ "label": "Getting started",
353
+ "href": "/getting-started"
354
+ },
355
+ {
356
+ "label": "Use cases",
357
+ "href": "/use-cases"
358
+ },
359
+ {
360
+ "label": "Catalog",
361
+ "href": "/catalog"
362
+ },
363
+ {
364
+ "label": "Agents/SDK",
365
+ "href": "/agents"
366
+ }
367
+ ]
368
+ };
369
+ export const manifest = {
370
+ "version": 1,
371
+ "product": "xops",
372
+ "site": "https://docs.xops.x12i.com",
373
+ "knowledgePackage": "@x12i/xops-docs",
374
+ "roles": [
375
+ "developers",
376
+ "builders"
377
+ ],
378
+ "books": [
379
+ {
380
+ "id": "00-platform-overview",
381
+ "audiences": [
382
+ "developers",
383
+ "builders"
384
+ ],
385
+ "md": {
386
+ "developers": "downloads/books/00-platform-overview/developers.md",
387
+ "builders": "downloads/books/00-platform-overview/builders.md"
388
+ },
389
+ "pdf": {
390
+ "developers": null,
391
+ "builders": null
392
+ },
393
+ "chapters": {
394
+ "developers": "downloads/books/00-platform-overview/developers.chapters.json",
395
+ "builders": "downloads/books/00-platform-overview/builders.chapters.json"
396
+ }
397
+ },
398
+ {
399
+ "id": "01-install-and-daily",
400
+ "audiences": [
401
+ "developers"
402
+ ],
403
+ "md": {
404
+ "developers": "downloads/books/01-install-and-daily/developers.md"
405
+ },
406
+ "pdf": {
407
+ "developers": null
408
+ },
409
+ "chapters": {
410
+ "developers": "downloads/books/01-install-and-daily/developers.chapters.json"
411
+ }
412
+ },
413
+ {
414
+ "id": "02-release-and-publish",
415
+ "audiences": [
416
+ "developers"
417
+ ],
418
+ "md": {
419
+ "developers": "downloads/books/02-release-and-publish/developers.md"
420
+ },
421
+ "pdf": {
422
+ "developers": null
423
+ },
424
+ "chapters": {
425
+ "developers": "downloads/books/02-release-and-publish/developers.chapters.json"
426
+ }
427
+ },
428
+ {
429
+ "id": "03-cli-sdk-mcp",
430
+ "audiences": [
431
+ "developers"
432
+ ],
433
+ "md": {
434
+ "developers": "downloads/books/03-cli-sdk-mcp/developers.md"
435
+ },
436
+ "pdf": {
437
+ "developers": null
438
+ },
439
+ "chapters": {
440
+ "developers": "downloads/books/03-cli-sdk-mcp/developers.chapters.json"
441
+ }
442
+ },
443
+ {
444
+ "id": "04-ops-and-tools",
445
+ "audiences": [
446
+ "builders"
447
+ ],
448
+ "md": {
449
+ "builders": "downloads/books/04-ops-and-tools/builders.md"
450
+ },
451
+ "pdf": {
452
+ "builders": null
453
+ },
454
+ "chapters": {
455
+ "builders": "downloads/books/04-ops-and-tools/builders.chapters.json"
456
+ }
457
+ },
458
+ {
459
+ "id": "05-agents-and-safety",
460
+ "audiences": [
461
+ "developers"
462
+ ],
463
+ "md": {
464
+ "developers": "downloads/books/05-agents-and-safety/developers.md"
465
+ },
466
+ "pdf": {
467
+ "developers": null
468
+ },
469
+ "chapters": {
470
+ "developers": "downloads/books/05-agents-and-safety/developers.chapters.json"
471
+ }
472
+ }
473
+ ],
474
+ "useCases": [
475
+ {
476
+ "id": "orient-xops",
477
+ "title": "Orient on xops",
478
+ "md": "downloads/use-cases/orient-xops.md",
479
+ "path": [
480
+ {
481
+ "bookId": "00-platform-overview",
482
+ "audience": "developers",
483
+ "chapters": [
484
+ "the-mental-model",
485
+ "one-contract-three-interfaces",
486
+ "what-xops-owns",
487
+ "hard-product-rules",
488
+ "which-book-next"
489
+ ]
490
+ }
491
+ ]
492
+ },
493
+ {
494
+ "id": "install-and-doctor",
495
+ "title": "Install xops and run doctor",
496
+ "md": "downloads/use-cases/install-and-doctor.md",
497
+ "path": [
498
+ {
499
+ "bookId": "01-install-and-daily",
500
+ "audience": "developers",
501
+ "chapters": [
502
+ "install-the-cli",
503
+ "confirm-on-path",
504
+ "run-doctor",
505
+ "workspace-install-once"
506
+ ]
507
+ }
508
+ ]
509
+ },
510
+ {
511
+ "id": "run-a-safe-release",
512
+ "title": "Run a safe release",
513
+ "md": "downloads/use-cases/run-a-safe-release.md",
514
+ "path": [
515
+ {
516
+ "bookId": "02-release-and-publish",
517
+ "audience": "developers",
518
+ "chapters": [
519
+ "discovery-and-order",
520
+ "safety-gates",
521
+ "publish-and-push",
522
+ "undo-and-recovery"
523
+ ]
524
+ }
525
+ ]
526
+ },
527
+ {
528
+ "id": "wire-sdk-or-mcp",
529
+ "title": "Wire the SDK or MCP",
530
+ "md": "downloads/use-cases/wire-sdk-or-mcp.md",
531
+ "path": [
532
+ {
533
+ "bookId": "03-cli-sdk-mcp",
534
+ "audience": "developers",
535
+ "chapters": [
536
+ "ask-and-passthrough",
537
+ "typed-sdk-results",
538
+ "mcp-tools-and-resources",
539
+ "plan-first-approvals"
540
+ ]
541
+ }
542
+ ]
543
+ },
544
+ {
545
+ "id": "operate-the-tool-catalog",
546
+ "title": "Operate the tool catalog",
547
+ "md": "downloads/use-cases/operate-the-tool-catalog.md",
548
+ "path": [
549
+ {
550
+ "bookId": "04-ops-and-tools",
551
+ "audience": "builders",
552
+ "chapters": [
553
+ "ops-status",
554
+ "recommendations",
555
+ "seamless-tools",
556
+ "playbooks"
557
+ ]
558
+ }
559
+ ]
560
+ },
561
+ {
562
+ "id": "brief-a-coding-agent",
563
+ "title": "Brief a coding agent",
564
+ "md": "downloads/use-cases/brief-a-coding-agent.md",
565
+ "path": [
566
+ {
567
+ "bookId": "05-agents-and-safety",
568
+ "audience": "developers",
569
+ "chapters": [
570
+ "ai-packs",
571
+ "agent-call-shape",
572
+ "publish-and-secret-safety",
573
+ "knowledge-sdk"
574
+ ]
575
+ }
576
+ ]
577
+ }
578
+ ]
579
+ };
580
+ export const files = {
581
+ "downloads/books/00-platform-overview/builders.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"the-mental-model\",\n \"title\": \"The mental model\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"one-contract-three-interfaces\",\n \"title\": \"One contract, three interfaces\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"what-operators-own-day-to-day\",\n \"title\": \"What operators own day to day\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"hard-product-rules\",\n \"title\": \"Hard product rules\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"which-book-next\",\n \"title\": \"Which book next\",\n \"level\": 2,\n \"order\": 5\n }\n]",
582
+ "downloads/books/00-platform-overview/builders.md": "# xops Platform Overview — Operators\n\n**Audience:** People who bootstrap PATH, CI, and the operating contract. \n**Twin:** [Developers version](../developers/BOOK.md) \n**Package:** `@x12i/xops` · **Hard rules:** [HARD-RULES.md](../../HARD-RULES.md)\n\n---\n\n## The mental model\n\nOperators keep the **operating surface** healthy so developers and agents can trust it.\n\nThat means: the CLI is installed under the correct scoped name (`@x12i/xops`), shims are on `PATH`, `xops doctor` is green, workspace install policy is understood, and the tools catalog reflects what the repo can actually run.\n\n---\n\n## One contract, three interfaces\n\nHumans use the CLI. CI and platforms use the SDK. Coding agents use MCP. You do not run a separate “agent ops stack” — you expose the same xops contract with the right profile and approval policy.\n\n---\n\n## What operators own day to day\n\n| Concern | Command / surface |\n|---|---|\n| Install health | `xops doctor` |\n| Repo operability | `xops ops status` |\n| Missing capabilities | `xops recommendations` |\n| Repeated workflows | `xops playbooks …` |\n| Agent hosts | `xops mcp` / `xops agent mcp` profiles |\n\n---\n\n## Hard product rules\n\nSame invariants as developers — especially: seamless tools only when catalog-marked; never force privileged installs; publish gates stay on. See [HARD-RULES.md](../../HARD-RULES.md).\n\n---\n\n## Which book next\n\n| Goal | Open |\n|---|---|\n| Install + PATH | [Install and Daily CLI](../../01-install-and-daily/developers/BOOK.md) |\n| Catalog / playbooks | [Ops and Tools](../../04-ops-and-tools/builders/BOOK.md) |\n| Agent safety | [Agents and Safety](../../05-agents-and-safety/developers/BOOK.md) |\n",
583
+ "downloads/books/00-platform-overview/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"the-mental-model\",\n \"title\": \"The mental model\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"one-contract-three-interfaces\",\n \"title\": \"One contract, three interfaces\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"what-xops-owns\",\n \"title\": \"What xops owns\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"hard-product-rules\",\n \"title\": \"Hard product rules\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"which-book-next\",\n \"title\": \"Which book next\",\n \"level\": 2,\n \"order\": 5\n }\n]",
584
+ "downloads/books/00-platform-overview/developers.md": "# xops Platform Overview — Developers\n\n**Audience:** Engineers and coding agents who run xops every day. \n**Twin:** [Operators version](../builders/BOOK.md) \n**Package:** `@x12i/xops` · **Hard rules:** [HARD-RULES.md](../../HARD-RULES.md)\n\n---\n\n## The mental model\n\n`npm` and `git` are not the problem. The problem is everything around them.\n\nxops is the **operating layer** for Node.js repositories. It detects repository state, routes work to the right native owner, plans risky actions, executes approved workflows, and reports what happened.\n\n> Native tools own their domains. \n> xops owns the workflow between them.\n\nxops does not replace npm, git, scanners, task runners, or code agents. It makes them usable as one safe operating surface.\n\n---\n\n## One contract, three interfaces\n\n| Interface | Caller | Shape |\n|---|---|---|\n| CLI | Humans | Readable prompts, recovery hints, summarized reports |\n| SDK | Scripts, CI, platforms | Typed `XopsRunResult`-style objects |\n| MCP | IDE / autonomous agents | Tools + resources; plan-first approvals |\n\n```bash\nxops doctor\nxops ask \"is this package publishable?\"\nxops mcp --stdio\n```\n\n```ts\nimport { runValidate, runRelease } from \"@x12i/xops\";\n```\n\nSame engine. Different presentation and safeguards per caller.\n\n---\n\n## What xops owns\n\n- Discovery of packages, workspaces, and dependency order\n- Install / validate / build health (including optional native binding remediations)\n- Release, publish, push, and undo with safety gates\n- Ask / passthrough over npm and git\n- Ops status, recommendations, seamless tool bootstrap\n- Operational playbooks (`kill-port`, `dev-stack`, `publish-chain`, …)\n- Agent context packs and MCP tool surfaces\n\nWhat it does **not** own: being a second package manager, unrestricted shell as primary interface, or inventing domain tools that already exist.\n\n---\n\n## Hard product rules\n\nSee [HARD-RULES.md](../../HARD-RULES.md). Short list: native owners stay native; plan before risk; workspace install once at root; never pin platform bindings into consumer manifests; secrets stay out of packs.\n\n---\n\n## Which book next\n\n| Goal | Open |\n|---|---|\n| Get on PATH / doctor | [Install and Daily CLI](../../01-install-and-daily/developers/BOOK.md) |\n| Publish safely | [Release and Publish](../../02-release-and-publish/developers/BOOK.md) |\n| Automate / agents | [CLI, SDK, and MCP](../../03-cli-sdk-mcp/developers/BOOK.md) |\n| Tool catalog / playbooks | [Ops and Tools](../../04-ops-and-tools/builders/BOOK.md) (Operators) |\n| AI packs + safety | [Agents and Safety](../../05-agents-and-safety/developers/BOOK.md) |\n",
585
+ "downloads/books/01-install-and-daily/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"install-the-cli\",\n \"title\": \"Install the CLI\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"confirm-on-path\",\n \"title\": \"Confirm on PATH\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"run-doctor\",\n \"title\": \"Run doctor\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"workspace-install-once\",\n \"title\": \"Workspace install once\",\n \"level\": 2,\n \"order\": 4\n },\n {\n \"slug\": \"daily-command-surface\",\n \"title\": \"Daily command surface\",\n \"level\": 2,\n \"order\": 5\n }\n]",
586
+ "downloads/books/01-install-and-daily/developers.md": "# Install and Daily CLI — Developers\n\n**Audience:** Anyone putting xops on a machine and using it as the daily command. \n**Package:** `@x12i/xops` · **CLI:** `xops` (aliases: `xnpm`, `xgit`, …)\n\n---\n\n## Install the CLI\n\nThe product command is `xops`. The **npm package name** is `@x12i/xops`.\n\n```bash\n# Windows\nnpm install -g @x12i/xops\n\n# macOS / Linux\nsudo npm install -g @x12i/xops\n```\n\nDo **not** confuse `xops install` (run the CLI against a repo) with `npm install -g @x12i/xops` (install the CLI itself).\n\nUntil PATH is fixed, `npx @x12i/xops doctor` still works.\n\n---\n\n## Confirm on PATH\n\nAfter install, npm should create launchers for `xops` and its aliases.\n\n```bash\nnpm list -g @x12i/xops\nnpm prefix -g\nwhich xops # or: Get-Command xops on PowerShell\n```\n\nIf the shim is missing, reinstall the scoped package. If the shim exists but the shell cannot find it, fix `PATH` / npm prefix (doctor can help).\n\n---\n\n## Run doctor\n\n```bash\nxops doctor\nnpx @x12i/xops doctor\n```\n\nDoctor checks Node, npm, git, PATH, npm prefix, and common Windows / Git Bash issues. Prefer it before any other troubleshooting.\n\n---\n\n## Workspace install once\n\nIn npm workspaces monorepos, the **supported** path is a single install at the workspace root:\n\n```bash\n# from workspace / git root\nxops install\n```\n\n`xops --here` / cwd-in-package scopes *xops discovery*, not a second npm install strategy. Prefer one root `package-lock.json`; nested member locks are hygiene debt.\n\nEmergency leaf bypass (`npm i --no-workspaces`) can unblock Windows arborist failures, but is not the supported parallel-tree strategy — reconcile back to a single root tree.\n\n---\n\n## Daily command surface\n\nExamples of the daily loop:\n\n```bash\nxops validate\nxops validate --build\nxops ask \"what packages changed?\"\nxops run build # passthrough\nxops status # git passthrough\nxops release --dry-run\n```\n\nUse `xops ask` for plain English; use native subcommands when you already know the verb. Set `XOPS_AUTO_INSTALL_TOOLS=0` to disable seamless tool auto-install.\n",
587
+ "downloads/books/02-release-and-publish/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"discovery-and-order\",\n \"title\": \"Discovery and order\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"safety-gates\",\n \"title\": \"Safety gates\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"publish-and-push\",\n \"title\": \"Publish and push\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"undo-and-recovery\",\n \"title\": \"Undo and recovery\",\n \"level\": 2,\n \"order\": 4\n }\n]",
588
+ "downloads/books/02-release-and-publish/developers.md": "# Release and Publish — Developers\n\n**Audience:** Humans and agents shipping packages with xops. \n**Related:** [Agents and Safety](../../05-agents-and-safety/developers/BOOK.md)\n\n---\n\n## Discovery and order\n\nxops discovers packages in the repo (single package, packages root, or workspaces), builds a dependency-aware publish order, and plans the release before mutating anything.\n\n```bash\nxops release --dry-run\nxops map\n```\n\nAgents and CI should prefer structured / JSON outputs and dry-run plans over scraping terminal prose.\n\n---\n\n## Safety gates\n\nBefore publish, xops applies safety checks that include (among others):\n\n- gitignore rules for `.env*` (and related patterns)\n- pack validation so secrets and junk do not ship in the tarball\n- registry / version consistency expectations for the planned packages\n\nIf a gate fails, fix the reported issue — do not bypass with force flags unless you explicitly understand the risk.\n\n---\n\n## Publish and push\n\nTypical human path:\n\n```bash\nxops release\n# or more explicit publish/push flows from the CLI once the plan is approved\n```\n\nTypical agent path: call the SDK / MCP release tools with an explicit approval profile. Risky operations return `approval-required` instead of blocking forever or publishing silently.\n\n---\n\n## Undo and recovery\n\nWhen a release step needs reversal, use the product undo path rather than ad-hoc git surgery:\n\n```bash\nxops undo\n```\n\nFor install/tree corruption, prefer root reinstall hygiene (`node_modules` + lock policy) and `xops validate` / `xops validate --build` after recovery. `xops clean` clears xops state — it is not a full `node_modules` wipe unless documented otherwise.\n",
589
+ "downloads/books/03-cli-sdk-mcp/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"ask-and-passthrough\",\n \"title\": \"Ask and passthrough\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"typed-sdk-results\",\n \"title\": \"Typed SDK results\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"mcp-tools-and-resources\",\n \"title\": \"MCP tools and resources\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"plan-first-approvals\",\n \"title\": \"Plan-first approvals\",\n \"level\": 2,\n \"order\": 4\n }\n]",
590
+ "downloads/books/03-cli-sdk-mcp/developers.md": "# CLI, SDK, and MCP — Developers\n\n**Audience:** Integrators wiring xops into scripts, CI, and agent hosts. \n**Package exports:** `@x12i/xops`, `@x12i/xops/mcp`, `@x12i/xops/playbooks`\n\n---\n\n## Ask and passthrough\n\n`xops ask` resolves plain-English requests to automation, npm/pnpm, or git. Native project package-manager and git subcommands also pass through (for example `xops run build`, `xops status`).\n\n```bash\nxops ask \"show parallel branches\"\nxops ask \"is this package publishable?\"\n```\n\nPrefer ask when the caller does not know the exact verb; prefer explicit commands when the verb is known.\n\n---\n\n## Typed SDK results\n\n```ts\nimport {\n detectRepository,\n runCheck,\n runAskPlan,\n runValidate,\n runRelease,\n runAiPack,\n listPlaybooks,\n planPlaybook,\n runPlaybook,\n} from \"@x12i/xops\";\n```\n\nSDK functions return structured results with issues, tool runs, recommendations, reports, repository context, duration, and stable status values. Agents should consume JSON — not scrape CLI text.\n\n---\n\n## MCP tools and resources\n\n```bash\nxops mcp --stdio\nxops mcp start --stdio\nxops agent mcp --stdio\nxops agent mcp --http --port 7331 --profile readonly\nxops mcp --list-tools\nxops mcp --list-resources\n```\n\nTools cover `xops.repo.*`, `xops.pkg.*`, `xops.deps.*`, `xops.security.*`, `xops.release.*`, `xops.ai.*`, `xops.net.*`, `xops.system.*`, `xops.node.*`, `xops.tools.*`, `xops.reports.*`, `xops.playbooks.*`, and `xops.plan.*`.\n\nResources include `xops://repo/context`, `xops://tools/catalog`, `xops://playbooks/catalog`, `xops://reports/latest`, and related URIs.\n\nMCP does **not** expose unrestricted shell as its primary interface.\n\n---\n\n## Plan-first approvals\n\nRisky MCP operations (mutations, publish/release, tool installation, network exposure scans) return structured `approval-required` or `authorization-required` unless the caller supplies explicit approval inputs and a profile that allows the action.\n\nSystem-native tools such as Nmap or Trivy are not silently installed; MCP returns missing-tool / setup guidance the same way the CLI agent mode does.\n",
591
+ "downloads/books/04-ops-and-tools/builders.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"ops-status\",\n \"title\": \"Ops status\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"recommendations\",\n \"title\": \"Recommendations\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"seamless-tools\",\n \"title\": \"Seamless tools\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"playbooks\",\n \"title\": \"Playbooks\",\n \"level\": 2,\n \"order\": 4\n }\n]",
592
+ "downloads/books/04-ops-and-tools/builders.md": "# Ops and Tools — Operators\n\n**Audience:** People who keep the operating contract honest across tools and hosts. \n**Related:** [Platform Overview](../../00-platform-overview/builders/BOOK.md)\n\n---\n\n## Ops status\n\n```bash\nxops ops status\n```\n\nOps status reports what is operable in the current repository: which supported tools are present, which capabilities are available, and where the operating surface is incomplete.\n\nTreat this as the inventory view before recommending changes.\n\n---\n\n## Recommendations\n\n```bash\nxops recommendations\nxops recommendations apply\n```\n\nRecommendations are evidence-based. xops should not invent tools the repo does not need. Apply only after reviewing the plan — especially for non-seamless setup that needs approval.\n\n---\n\n## Seamless tools\n\nWhen a missing tool is catalog-marked as seamless (user-space install, no password, no account login, no secret prompt, no privileged write), xops may bootstrap it behind the scenes during ask / ops flows.\n\n```bash\n# disable seamless auto-install\nexport XOPS_AUTO_INSTALL_TOOLS=0\n```\n\nNon-seamless tools always require explicit approval or operator setup.\n\n---\n\n## Playbooks\n\nOperational playbooks cover repeated repository actions with parameters, planning, risk metadata, and run reports.\n\n```bash\nxops playbooks list\nxops playbooks status --json\nxops playbooks init kill-port\nxops playbooks plan kill-port --port 3000 --json\nxops playbooks run kill-port --port 3000 --dry-run\nxops playbooks run dev-stack --stack jobs --port 3000\nxops playbooks run publish-chain --package @scope/app\n```\n\nBuilt-in catalog includes `kill-port`, `dev-stack`, `publish-chain`, and `publish-all`. Prefer playbooks over ad-hoc shell scripts when the action is already modeled.\n",
593
+ "downloads/books/05-agents-and-safety/developers.chapters.json": "[\n {\n \"slug\": \"preamble\",\n \"title\": \"Introduction\",\n \"level\": 2,\n \"order\": 0\n },\n {\n \"slug\": \"ai-packs\",\n \"title\": \"AI packs\",\n \"level\": 2,\n \"order\": 1\n },\n {\n \"slug\": \"agent-call-shape\",\n \"title\": \"Agent call shape\",\n \"level\": 2,\n \"order\": 2\n },\n {\n \"slug\": \"publish-and-secret-safety\",\n \"title\": \"Publish and secret safety\",\n \"level\": 2,\n \"order\": 3\n },\n {\n \"slug\": \"knowledge-sdk\",\n \"title\": \"Knowledge SDK\",\n \"level\": 2,\n \"order\": 4\n }\n]",
594
+ "downloads/books/05-agents-and-safety/developers.md": "# Agents and Safety — Developers\n\n**Audience:** Humans briefing agents, and agents consuming xops safely. \n**Knowledge package:** `@x12i/xops-docs` (devDependency only)\n\n---\n\n## AI packs\n\n```bash\nxops ai pack\n# or SDK: runAiPack(...)\n```\n\nAI packs assemble repository context for coding agents. Prefer the structured pack over dumping the whole monorepo into a prompt. Pair packs with this knowledge SDK for product how-to, and with MCP/SDK for runtime actions.\n\n---\n\n## Agent call shape\n\nAgents should:\n\n1. Read `agent-manifest.json` or call `@x12i/xops-docs` helpers for documentation.\n2. Call `@x12i/xops` SDK or MCP tools for work (validate, release plan, playbooks).\n3. Honor `approval-required` — never invent a silent publish path.\n4. Prefer JSON / structured results and stable exit codes.\n\nHumans get prose and recovery hints. Agents get deterministic plans and low-noise output.\n\n---\n\n## Publish and secret safety\n\nxops appends required gitignore rules for `.env` patterns and fails publish if `.env*` would ship in the tarball. Docs and agent packs must never print secret values.\n\nAlready-tracked secrets are not magically untracked — use hooks/CI if you need commit-time enforcement beyond pack checks.\n\n---\n\n## Knowledge SDK\n\n```bash\nnpm i -D @x12i/xops-docs\n```\n\n```ts\nimport { xopsDocs } from \"@x12i/xops-docs\";\n\nxopsDocs.listUseCases({ audience: \"developers\", tag: \"release\" });\nxopsDocs.getUseCaseMarkdown(\"run-a-safe-release\");\nxopsDocs.getBookMarkdown(\"00-platform-overview\", \"developers\");\nxopsDocs.manifest();\n```\n\nInstall as a **devDependency** only. Runtime operate uses `@x12i/xops` / MCP — not the docs package.\n",
595
+ "downloads/use-cases/brief-a-coding-agent.md": "# Brief a coding agent\n\n> **Use case id:** `brief-a-coding-agent`\n> **Goal:** Generate AI context packs and teach an agent to use xops safely.\n> **Audiences:** developers\n> **Tags:** agents, ai-pack, safety\n\n## Reading path\n\n1. **Agents and Safety** (developers) → chapters: `ai-packs`, `agent-call-shape`, `publish-and-secret-safety`, `knowledge-sdk`\n\n## From: Agents and Safety — AI packs\n\n```bash\nxops ai pack\n# or SDK: runAiPack(...)\n```\n\nAI packs assemble repository context for coding agents. Prefer the structured pack over dumping the whole monorepo into a prompt. Pair packs with this knowledge SDK for product how-to, and with MCP/SDK for runtime actions.\n\n---\n\n## From: Agents and Safety — Agent call shape\n\nAgents should:\n\n1. Read `agent-manifest.json` or call `@x12i/xops-docs` helpers for documentation.\n2. Call `@x12i/xops` SDK or MCP tools for work (validate, release plan, playbooks).\n3. Honor `approval-required` — never invent a silent publish path.\n4. Prefer JSON / structured results and stable exit codes.\n\nHumans get prose and recovery hints. Agents get deterministic plans and low-noise output.\n\n---\n\n## From: Agents and Safety — Publish and secret safety\n\nxops appends required gitignore rules for `.env` patterns and fails publish if `.env*` would ship in the tarball. Docs and agent packs must never print secret values.\n\nAlready-tracked secrets are not magically untracked — use hooks/CI if you need commit-time enforcement beyond pack checks.\n\n---\n\n## From: Agents and Safety — Knowledge SDK\n\n```bash\nnpm i -D @x12i/xops-docs\n```\n\n```ts\nimport { xopsDocs } from \"@x12i/xops-docs\";\n\nxopsDocs.listUseCases({ audience: \"developers\", tag: \"release\" });\nxopsDocs.getUseCaseMarkdown(\"run-a-safe-release\");\nxopsDocs.getBookMarkdown(\"00-platform-overview\", \"developers\");\nxopsDocs.manifest();\n```\n\nInstall as a **devDependency** only. Runtime operate uses `@x12i/xops` / MCP — not the docs package.\n\n## Also see\n\n- **Agents and Safety** (`05-agents-and-safety`) — AI context packs, safety gates, and how agents should call xops without scraping terminals.\n- **CLI, SDK, and MCP** (`03-cli-sdk-mcp`) — Ask, typed SDK results, MCP tools/resources, and plan-first approvals for agents.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
596
+ "downloads/use-cases/install-and-doctor.md": "# Install xops and run doctor\n\n> **Use case id:** `install-and-doctor`\n> **Goal:** Get @x12i/xops on PATH, confirm shims, and clear doctor checks.\n> **Audiences:** developers, builders\n> **Tags:** install, doctor\n\n## Reading path\n\n1. **Install and Daily CLI** (developers) → chapters: `install-the-cli`, `confirm-on-path`, `run-doctor`, `workspace-install-once`\n\n## From: Install and Daily CLI — Install the CLI\n\nThe product command is `xops`. The **npm package name** is `@x12i/xops`.\n\n```bash\n# Windows\nnpm install -g @x12i/xops\n\n# macOS / Linux\nsudo npm install -g @x12i/xops\n```\n\nDo **not** confuse `xops install` (run the CLI against a repo) with `npm install -g @x12i/xops` (install the CLI itself).\n\nUntil PATH is fixed, `npx @x12i/xops doctor` still works.\n\n---\n\n## From: Install and Daily CLI — Confirm on PATH\n\nAfter install, npm should create launchers for `xops` and its aliases.\n\n```bash\nnpm list -g @x12i/xops\nnpm prefix -g\nwhich xops # or: Get-Command xops on PowerShell\n```\n\nIf the shim is missing, reinstall the scoped package. If the shim exists but the shell cannot find it, fix `PATH` / npm prefix (doctor can help).\n\n---\n\n## From: Install and Daily CLI — Run doctor\n\n```bash\nxops doctor\nnpx @x12i/xops doctor\n```\n\nDoctor checks Node, npm, git, PATH, npm prefix, and common Windows / Git Bash issues. Prefer it before any other troubleshooting.\n\n---\n\n## From: Install and Daily CLI — Workspace install once\n\nIn npm workspaces monorepos, the **supported** path is a single install at the workspace root:\n\n```bash\n# from workspace / git root\nxops install\n```\n\n`xops --here` / cwd-in-package scopes *xops discovery*, not a second npm install strategy. Prefer one root `package-lock.json`; nested member locks are hygiene debt.\n\nEmergency leaf bypass (`npm i --no-workspaces`) can unblock Windows arborist failures, but is not the supported parallel-tree strategy — reconcile back to a single root tree.\n\n---\n\n## Also see\n\n- **Install and Daily CLI** (`01-install-and-daily`) — Global install, doctor, workspace install-once, and the daily command surface.\n- **Ops and Tools** (`04-ops-and-tools`) — ops status, recommendations, seamless tools, and operational playbooks.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
597
+ "downloads/use-cases/operate-the-tool-catalog.md": "# Operate the tool catalog\n\n> **Use case id:** `operate-the-tool-catalog`\n> **Goal:** Read ops status, apply recommendations, and run playbooks without inventing a second ops stack.\n> **Audiences:** builders\n> **Tags:** ops, tools, playbooks\n\n## Reading path\n\n1. **Ops and Tools** (builders) → chapters: `ops-status`, `recommendations`, `seamless-tools`, `playbooks`\n\n## From: Ops and Tools — Ops status\n\n```bash\nxops ops status\n```\n\nOps status reports what is operable in the current repository: which supported tools are present, which capabilities are available, and where the operating surface is incomplete.\n\nTreat this as the inventory view before recommending changes.\n\n---\n\n## From: Ops and Tools — Recommendations\n\n```bash\nxops recommendations\nxops recommendations apply\n```\n\nRecommendations are evidence-based. xops should not invent tools the repo does not need. Apply only after reviewing the plan — especially for non-seamless setup that needs approval.\n\n---\n\n## From: Ops and Tools — Seamless tools\n\nWhen a missing tool is catalog-marked as seamless (user-space install, no password, no account login, no secret prompt, no privileged write), xops may bootstrap it behind the scenes during ask / ops flows.\n\n```bash\n# disable seamless auto-install\nexport XOPS_AUTO_INSTALL_TOOLS=0\n```\n\nNon-seamless tools always require explicit approval or operator setup.\n\n---\n\n## From: Ops and Tools — Playbooks\n\nOperational playbooks cover repeated repository actions with parameters, planning, risk metadata, and run reports.\n\n```bash\nxops playbooks list\nxops playbooks status --json\nxops playbooks init kill-port\nxops playbooks plan kill-port --port 3000 --json\nxops playbooks run kill-port --port 3000 --dry-run\nxops playbooks run dev-stack --stack jobs --port 3000\nxops playbooks run publish-chain --package @scope/app\n```\n\nBuilt-in catalog includes `kill-port`, `dev-stack`, `publish-chain`, and `publish-all`. Prefer playbooks over ad-hoc shell scripts when the action is already modeled.\n\n## Also see\n\n- **Ops and Tools** (`04-ops-and-tools`) — ops status, recommendations, seamless tools, and operational playbooks.\n- **Platform Overview** (`00-platform-overview`) — What xops is, the operating contract, three interfaces, and which book to open next.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
598
+ "downloads/use-cases/orient-xops.md": "# Orient on xops\n\n> **Use case id:** `orient-xops`\n> **Goal:** Understand the operating layer, three interfaces, and which book to open next.\n> **Audiences:** developers, builders\n> **Tags:** platform, start-here\n\n## Reading path\n\n1. **Platform Overview** (developers) → chapters: `the-mental-model`, `one-contract-three-interfaces`, `what-xops-owns`, `hard-product-rules`, `which-book-next`\n\n## From: Platform Overview — The mental model\n\n`npm` and `git` are not the problem. The problem is everything around them.\n\nxops is the **operating layer** for Node.js repositories. It detects repository state, routes work to the right native owner, plans risky actions, executes approved workflows, and reports what happened.\n\n> Native tools own their domains. \n> xops owns the workflow between them.\n\nxops does not replace npm, git, scanners, task runners, or code agents. It makes them usable as one safe operating surface.\n\n---\n\n## From: Platform Overview — One contract, three interfaces\n\n| Interface | Caller | Shape |\n|---|---|---|\n| CLI | Humans | Readable prompts, recovery hints, summarized reports |\n| SDK | Scripts, CI, platforms | Typed `XopsRunResult`-style objects |\n| MCP | IDE / autonomous agents | Tools + resources; plan-first approvals |\n\n```bash\nxops doctor\nxops ask \"is this package publishable?\"\nxops mcp --stdio\n```\n\n```ts\nimport { runValidate, runRelease } from \"@x12i/xops\";\n```\n\nSame engine. Different presentation and safeguards per caller.\n\n---\n\n## From: Platform Overview — What xops owns\n\n- Discovery of packages, workspaces, and dependency order\n- Install / validate / build health (including optional native binding remediations)\n- Release, publish, push, and undo with safety gates\n- Ask / passthrough over npm and git\n- Ops status, recommendations, seamless tool bootstrap\n- Operational playbooks (`kill-port`, `dev-stack`, `publish-chain`, …)\n- Agent context packs and MCP tool surfaces\n\nWhat it does **not** own: being a second package manager, unrestricted shell as primary interface, or inventing domain tools that already exist.\n\n---\n\n## From: Platform Overview — Hard product rules\n\nSee [HARD-RULES.md](../../HARD-RULES.md). Short list: native owners stay native; plan before risk; workspace install once at root; never pin platform bindings into consumer manifests; secrets stay out of packs.\n\n---\n\n## From: Platform Overview — Which book next\n\n| Goal | Open |\n|---|---|\n| Get on PATH / doctor | [Install and Daily CLI](../../01-install-and-daily/developers/BOOK.md) |\n| Publish safely | [Release and Publish](../../02-release-and-publish/developers/BOOK.md) |\n| Automate / agents | [CLI, SDK, and MCP](../../03-cli-sdk-mcp/developers/BOOK.md) |\n| Tool catalog / playbooks | [Ops and Tools](../../04-ops-and-tools/builders/BOOK.md) (Operators) |\n| AI packs + safety | [Agents and Safety](../../05-agents-and-safety/developers/BOOK.md) |\n\n## Also see\n\n- **Platform Overview** (`00-platform-overview`) — What xops is, the operating contract, three interfaces, and which book to open next.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
599
+ "downloads/use-cases/run-a-safe-release.md": "# Run a safe release\n\n> **Use case id:** `run-a-safe-release`\n> **Goal:** Plan, approve, publish, and undo a monorepo or single-package release.\n> **Audiences:** developers\n> **Tags:** release, publish\n\n## Reading path\n\n1. **Release and Publish** (developers) → chapters: `discovery-and-order`, `safety-gates`, `publish-and-push`, `undo-and-recovery`\n\n## From: Release and Publish — Discovery and order\n\nxops discovers packages in the repo (single package, packages root, or workspaces), builds a dependency-aware publish order, and plans the release before mutating anything.\n\n```bash\nxops release --dry-run\nxops map\n```\n\nAgents and CI should prefer structured / JSON outputs and dry-run plans over scraping terminal prose.\n\n---\n\n## From: Release and Publish — Safety gates\n\nBefore publish, xops applies safety checks that include (among others):\n\n- gitignore rules for `.env*` (and related patterns)\n- pack validation so secrets and junk do not ship in the tarball\n- registry / version consistency expectations for the planned packages\n\nIf a gate fails, fix the reported issue — do not bypass with force flags unless you explicitly understand the risk.\n\n---\n\n## From: Release and Publish — Publish and push\n\nTypical human path:\n\n```bash\nxops release\n# or more explicit publish/push flows from the CLI once the plan is approved\n```\n\nTypical agent path: call the SDK / MCP release tools with an explicit approval profile. Risky operations return `approval-required` instead of blocking forever or publishing silently.\n\n---\n\n## From: Release and Publish — Undo and recovery\n\nWhen a release step needs reversal, use the product undo path rather than ad-hoc git surgery:\n\n```bash\nxops undo\n```\n\nFor install/tree corruption, prefer root reinstall hygiene (`node_modules` + lock policy) and `xops validate` / `xops validate --build` after recovery. `xops clean` clears xops state — it is not a full `node_modules` wipe unless documented otherwise.\n\n## Also see\n\n- **Release and Publish** (`02-release-and-publish`) — Discovery, dependency order, safety, publish, push, and undo for humans and agents.\n- **Agents and Safety** (`05-agents-and-safety`) — AI context packs, safety gates, and how agents should call xops without scraping terminals.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
600
+ "downloads/use-cases/wire-sdk-or-mcp.md": "# Wire the SDK or MCP\n\n> **Use case id:** `wire-sdk-or-mcp`\n> **Goal:** Call the same operating layer from TypeScript or an MCP host with plan-first approvals.\n> **Audiences:** developers\n> **Tags:** sdk, mcp, agents\n\n## Reading path\n\n1. **CLI, SDK, and MCP** (developers) → chapters: `ask-and-passthrough`, `typed-sdk-results`, `mcp-tools-and-resources`, `plan-first-approvals`\n\n## From: CLI, SDK, and MCP — Ask and passthrough\n\n`xops ask` resolves plain-English requests to automation, npm/pnpm, or git. Native project package-manager and git subcommands also pass through (for example `xops run build`, `xops status`).\n\n```bash\nxops ask \"show parallel branches\"\nxops ask \"is this package publishable?\"\n```\n\nPrefer ask when the caller does not know the exact verb; prefer explicit commands when the verb is known.\n\n---\n\n## From: CLI, SDK, and MCP — Typed SDK results\n\n```ts\nimport {\n detectRepository,\n runCheck,\n runAskPlan,\n runValidate,\n runRelease,\n runAiPack,\n listPlaybooks,\n planPlaybook,\n runPlaybook,\n} from \"@x12i/xops\";\n```\n\nSDK functions return structured results with issues, tool runs, recommendations, reports, repository context, duration, and stable status values. Agents should consume JSON — not scrape CLI text.\n\n---\n\n## From: CLI, SDK, and MCP — MCP tools and resources\n\n```bash\nxops mcp --stdio\nxops mcp start --stdio\nxops agent mcp --stdio\nxops agent mcp --http --port 7331 --profile readonly\nxops mcp --list-tools\nxops mcp --list-resources\n```\n\nTools cover `xops.repo.*`, `xops.pkg.*`, `xops.deps.*`, `xops.security.*`, `xops.release.*`, `xops.ai.*`, `xops.net.*`, `xops.system.*`, `xops.node.*`, `xops.tools.*`, `xops.reports.*`, `xops.playbooks.*`, and `xops.plan.*`.\n\nResources include `xops://repo/context`, `xops://tools/catalog`, `xops://playbooks/catalog`, `xops://reports/latest`, and related URIs.\n\nMCP does **not** expose unrestricted shell as its primary interface.\n\n---\n\n## From: CLI, SDK, and MCP — Plan-first approvals\n\nRisky MCP operations (mutations, publish/release, tool installation, network exposure scans) return structured `approval-required` or `authorization-required` unless the caller supplies explicit approval inputs and a profile that allows the action.\n\nSystem-native tools such as Nmap or Trivy are not silently installed; MCP returns missing-tool / setup guidance the same way the CLI agent mode does.\n\n## Also see\n\n- **CLI, SDK, and MCP** (`03-cli-sdk-mcp`) — Ask, typed SDK results, MCP tools/resources, and plan-first approvals for agents.\n- **Agents and Safety** (`05-agents-and-safety`) — AI context packs, safety gates, and how agents should call xops without scraping terminals.\n\n---\n\n_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._\n",
601
+ "catalog.json": "{\"roles\":[{\"id\":\"developers\",\"label\":\"Developers\",\"tagline\":\"Run xops every day\",\"description\":\"Humans and coding agents who install, release, ask, and operate Node.js repositories through xops.\"},{\"id\":\"builders\",\"label\":\"Operators\",\"tagline\":\"Set up PATH, CI, and the operating contract\",\"description\":\"People who bootstrap the CLI, wire CI/agent hosts, and keep doctor/ops status green.\"}],\"families\":[{\"id\":\"xops\",\"name\":\"xops\",\"tagline\":\"The operating layer for Node.js repositories.\",\"description\":\"Detects repo state, routes work to native owners, plans risky actions, executes approved workflows, and reports what happened — via CLI, SDK, and MCP.\",\"color\":\"#1a2f45\"}],\"books\":[{\"id\":\"00-platform-overview\",\"familyId\":\"xops\",\"audiences\":[\"developers\",\"builders\"],\"status\":\"available\",\"kicker\":\"CASE FILE · XOPS-00\",\"title\":\"Platform Overview\",\"subtitle\":\"Mental model and surfaces\",\"blurb\":\"What xops is, the operating contract, three interfaces, and which book to open next.\",\"tags\":[\"platform\",\"start-here\"],\"color\":\"#1a2f45\",\"dir\":\"00-platform-overview\"},{\"id\":\"01-install-and-daily\",\"familyId\":\"xops\",\"audiences\":[\"developers\"],\"status\":\"available\",\"kicker\":\"CASE FILE · XOPS-01\",\"title\":\"Install and Daily CLI\",\"subtitle\":\"Get xops on PATH and use it every day\",\"blurb\":\"Global install, doctor, workspace install-once, and the daily command surface.\",\"tags\":[\"install\",\"cli\",\"workspaces\"],\"color\":\"#b14a2c\",\"dir\":\"01-install-and-daily\"},{\"id\":\"02-release-and-publish\",\"familyId\":\"xops\",\"audiences\":[\"developers\"],\"status\":\"available\",\"kicker\":\"CASE FILE · XOPS-02\",\"title\":\"Release and Publish\",\"subtitle\":\"The original wedge\",\"blurb\":\"Discovery, dependency order, safety, publish, push, and undo for humans and agents.\",\"tags\":[\"release\",\"publish\",\"safety\"],\"color\":\"#1f6e5c\",\"dir\":\"02-release-and-publish\"},{\"id\":\"03-cli-sdk-mcp\",\"familyId\":\"xops\",\"audiences\":[\"developers\"],\"status\":\"available\",\"kicker\":\"CASE FILE · XOPS-03\",\"title\":\"CLI, SDK, and MCP\",\"subtitle\":\"One contract, three interfaces\",\"blurb\":\"Ask, typed SDK results, MCP tools/resources, and plan-first approvals for agents.\",\"tags\":[\"sdk\",\"mcp\",\"ask\",\"agents\"],\"color\":\"#a5710f\",\"dir\":\"03-cli-sdk-mcp\"},{\"id\":\"04-ops-and-tools\",\"familyId\":\"xops\",\"audiences\":[\"builders\"],\"status\":\"available\",\"kicker\":\"CASE FILE · XOPS-04\",\"title\":\"Ops and Tools\",\"subtitle\":\"Catalog, recommendations, playbooks\",\"blurb\":\"ops status, recommendations, seamless tools, and operational playbooks.\",\"tags\":[\"ops\",\"tools\",\"playbooks\"],\"color\":\"#2c5f7a\",\"dir\":\"04-ops-and-tools\",\"buildersPrimary\":true},{\"id\":\"05-agents-and-safety\",\"familyId\":\"xops\",\"audiences\":[\"developers\"],\"status\":\"available\",\"kicker\":\"CASE FILE · XOPS-05\",\"title\":\"Agents and Safety\",\"subtitle\":\"Agent packs, gitignore, publish safety\",\"blurb\":\"AI context packs, safety gates, and how agents should call xops without scraping terminals.\",\"tags\":[\"agents\",\"safety\",\"ai-pack\"],\"color\":\"#4a3f6b\",\"dir\":\"05-agents-and-safety\"}]}",
602
+ "use-cases.json": "{\"useCases\":[{\"id\":\"orient-xops\",\"title\":\"Orient on xops\",\"goal\":\"Understand the operating layer, three interfaces, and which book to open next.\",\"audiences\":[\"developers\",\"builders\"],\"tags\":[\"platform\",\"start-here\"],\"path\":[{\"bookId\":\"00-platform-overview\",\"audience\":\"developers\",\"chapters\":[\"the-mental-model\",\"one-contract-three-interfaces\",\"what-xops-owns\",\"hard-product-rules\",\"which-book-next\"]}],\"alsoSee\":[\"00-platform-overview\"]},{\"id\":\"install-and-doctor\",\"title\":\"Install xops and run doctor\",\"goal\":\"Get @x12i/xops on PATH, confirm shims, and clear doctor checks.\",\"audiences\":[\"developers\",\"builders\"],\"tags\":[\"install\",\"doctor\"],\"path\":[{\"bookId\":\"01-install-and-daily\",\"audience\":\"developers\",\"chapters\":[\"install-the-cli\",\"confirm-on-path\",\"run-doctor\",\"workspace-install-once\"]}],\"alsoSee\":[\"01-install-and-daily\",\"04-ops-and-tools\"]},{\"id\":\"run-a-safe-release\",\"title\":\"Run a safe release\",\"goal\":\"Plan, approve, publish, and undo a monorepo or single-package release.\",\"audiences\":[\"developers\"],\"tags\":[\"release\",\"publish\"],\"path\":[{\"bookId\":\"02-release-and-publish\",\"audience\":\"developers\",\"chapters\":[\"discovery-and-order\",\"safety-gates\",\"publish-and-push\",\"undo-and-recovery\"]}],\"alsoSee\":[\"02-release-and-publish\",\"05-agents-and-safety\"]},{\"id\":\"wire-sdk-or-mcp\",\"title\":\"Wire the SDK or MCP\",\"goal\":\"Call the same operating layer from TypeScript or an MCP host with plan-first approvals.\",\"audiences\":[\"developers\"],\"tags\":[\"sdk\",\"mcp\",\"agents\"],\"path\":[{\"bookId\":\"03-cli-sdk-mcp\",\"audience\":\"developers\",\"chapters\":[\"ask-and-passthrough\",\"typed-sdk-results\",\"mcp-tools-and-resources\",\"plan-first-approvals\"]}],\"alsoSee\":[\"03-cli-sdk-mcp\",\"05-agents-and-safety\"]},{\"id\":\"operate-the-tool-catalog\",\"title\":\"Operate the tool catalog\",\"goal\":\"Read ops status, apply recommendations, and run playbooks without inventing a second ops stack.\",\"audiences\":[\"builders\"],\"tags\":[\"ops\",\"tools\",\"playbooks\"],\"path\":[{\"bookId\":\"04-ops-and-tools\",\"audience\":\"builders\",\"chapters\":[\"ops-status\",\"recommendations\",\"seamless-tools\",\"playbooks\"]}],\"alsoSee\":[\"04-ops-and-tools\",\"00-platform-overview\"]},{\"id\":\"brief-a-coding-agent\",\"title\":\"Brief a coding agent\",\"goal\":\"Generate AI context packs and teach an agent to use xops safely.\",\"audiences\":[\"developers\"],\"tags\":[\"agents\",\"ai-pack\",\"safety\"],\"path\":[{\"bookId\":\"05-agents-and-safety\",\"audience\":\"developers\",\"chapters\":[\"ai-packs\",\"agent-call-shape\",\"publish-and-secret-safety\",\"knowledge-sdk\"]}],\"alsoSee\":[\"05-agents-and-safety\",\"03-cli-sdk-mcp\"]}]}",
603
+ "site.json": "{\"product\":\"xops\",\"brand\":\"xops · docs\",\"brandAccent\":\"docs\",\"siteUrl\":\"https://docs.xops.x12i.com\",\"knowledgePackage\":\"@x12i/xops-docs\",\"footer\":\"XOPS FIELD GUIDES · OPERATING LAYER\",\"accent\":\"oklch(42% 0.09 250)\",\"accentAlt\":\"oklch(52% 0.11 35)\",\"productUrl\":\"https://github.com/x12i/npm\",\"nav\":[{\"label\":\"Getting started\",\"href\":\"/getting-started\"},{\"label\":\"Use cases\",\"href\":\"/use-cases\"},{\"label\":\"Catalog\",\"href\":\"/catalog\"}],\"footerLinks\":[{\"label\":\"Docs home\",\"href\":\"/docs\"},{\"label\":\"Getting started\",\"href\":\"/getting-started\"},{\"label\":\"Use cases\",\"href\":\"/use-cases\"},{\"label\":\"Catalog\",\"href\":\"/catalog\"},{\"label\":\"Agents/SDK\",\"href\":\"/agents\"}]}",
604
+ "agent-manifest.json": "{\"version\":1,\"product\":\"xops\",\"site\":\"https://docs.xops.x12i.com\",\"knowledgePackage\":\"@x12i/xops-docs\",\"roles\":[\"developers\",\"builders\"],\"books\":[{\"id\":\"00-platform-overview\",\"audiences\":[\"developers\",\"builders\"],\"md\":{\"developers\":\"downloads/books/00-platform-overview/developers.md\",\"builders\":\"downloads/books/00-platform-overview/builders.md\"},\"pdf\":{\"developers\":null,\"builders\":null},\"chapters\":{\"developers\":\"downloads/books/00-platform-overview/developers.chapters.json\",\"builders\":\"downloads/books/00-platform-overview/builders.chapters.json\"}},{\"id\":\"01-install-and-daily\",\"audiences\":[\"developers\"],\"md\":{\"developers\":\"downloads/books/01-install-and-daily/developers.md\"},\"pdf\":{\"developers\":null},\"chapters\":{\"developers\":\"downloads/books/01-install-and-daily/developers.chapters.json\"}},{\"id\":\"02-release-and-publish\",\"audiences\":[\"developers\"],\"md\":{\"developers\":\"downloads/books/02-release-and-publish/developers.md\"},\"pdf\":{\"developers\":null},\"chapters\":{\"developers\":\"downloads/books/02-release-and-publish/developers.chapters.json\"}},{\"id\":\"03-cli-sdk-mcp\",\"audiences\":[\"developers\"],\"md\":{\"developers\":\"downloads/books/03-cli-sdk-mcp/developers.md\"},\"pdf\":{\"developers\":null},\"chapters\":{\"developers\":\"downloads/books/03-cli-sdk-mcp/developers.chapters.json\"}},{\"id\":\"04-ops-and-tools\",\"audiences\":[\"builders\"],\"md\":{\"builders\":\"downloads/books/04-ops-and-tools/builders.md\"},\"pdf\":{\"builders\":null},\"chapters\":{\"builders\":\"downloads/books/04-ops-and-tools/builders.chapters.json\"}},{\"id\":\"05-agents-and-safety\",\"audiences\":[\"developers\"],\"md\":{\"developers\":\"downloads/books/05-agents-and-safety/developers.md\"},\"pdf\":{\"developers\":null},\"chapters\":{\"developers\":\"downloads/books/05-agents-and-safety/developers.chapters.json\"}}],\"useCases\":[{\"id\":\"orient-xops\",\"title\":\"Orient on xops\",\"md\":\"downloads/use-cases/orient-xops.md\",\"path\":[{\"bookId\":\"00-platform-overview\",\"audience\":\"developers\",\"chapters\":[\"the-mental-model\",\"one-contract-three-interfaces\",\"what-xops-owns\",\"hard-product-rules\",\"which-book-next\"]}]},{\"id\":\"install-and-doctor\",\"title\":\"Install xops and run doctor\",\"md\":\"downloads/use-cases/install-and-doctor.md\",\"path\":[{\"bookId\":\"01-install-and-daily\",\"audience\":\"developers\",\"chapters\":[\"install-the-cli\",\"confirm-on-path\",\"run-doctor\",\"workspace-install-once\"]}]},{\"id\":\"run-a-safe-release\",\"title\":\"Run a safe release\",\"md\":\"downloads/use-cases/run-a-safe-release.md\",\"path\":[{\"bookId\":\"02-release-and-publish\",\"audience\":\"developers\",\"chapters\":[\"discovery-and-order\",\"safety-gates\",\"publish-and-push\",\"undo-and-recovery\"]}]},{\"id\":\"wire-sdk-or-mcp\",\"title\":\"Wire the SDK or MCP\",\"md\":\"downloads/use-cases/wire-sdk-or-mcp.md\",\"path\":[{\"bookId\":\"03-cli-sdk-mcp\",\"audience\":\"developers\",\"chapters\":[\"ask-and-passthrough\",\"typed-sdk-results\",\"mcp-tools-and-resources\",\"plan-first-approvals\"]}]},{\"id\":\"operate-the-tool-catalog\",\"title\":\"Operate the tool catalog\",\"md\":\"downloads/use-cases/operate-the-tool-catalog.md\",\"path\":[{\"bookId\":\"04-ops-and-tools\",\"audience\":\"builders\",\"chapters\":[\"ops-status\",\"recommendations\",\"seamless-tools\",\"playbooks\"]}]},{\"id\":\"brief-a-coding-agent\",\"title\":\"Brief a coding agent\",\"md\":\"downloads/use-cases/brief-a-coding-agent.md\",\"path\":[{\"bookId\":\"05-agents-and-safety\",\"audience\":\"developers\",\"chapters\":[\"ai-packs\",\"agent-call-shape\",\"publish-and-secret-safety\",\"knowledge-sdk\"]}]}]}"
605
+ };
@@ -0,0 +1,7 @@
1
+ import { type DocifySdk } from "@x12i/docify-sdk";
2
+ import { catalog, useCases, site, manifest, files } from "./generated/bundle.js";
3
+ /** Pre-wired xops knowledge SDK. Install as a **devDependency** only. */
4
+ export declare const xopsDocs: DocifySdk;
5
+ export { createDocifySdk, type DocifySdk } from "@x12i/docify-sdk";
6
+ export { catalog, useCases, site, manifest, files };
7
+ export default xopsDocs;
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import { createDocifySdk } from "@x12i/docify-sdk";
2
+ import { catalog, useCases, site, manifest, files } from "./generated/bundle.js";
3
+ /** Pre-wired xops knowledge SDK. Install as a **devDependency** only. */
4
+ export const xopsDocs = createDocifySdk({
5
+ catalog: catalog,
6
+ useCases: useCases,
7
+ site: site,
8
+ manifest: manifest,
9
+ files,
10
+ });
11
+ export { createDocifySdk } from "@x12i/docify-sdk";
12
+ export { catalog, useCases, site, manifest, files };
13
+ export default xopsDocs;
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@x12i/xops-docs",
3
+ "version": "0.1.0",
4
+ "description": "xops docs knowledge SDK — install as a devDependency only. Catalog, use cases, and markdown packs for humans and agents.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "xops-docs": "bin/xops-docs.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "bin",
20
+ "README.md"
21
+ ],
22
+ "scripts": {
23
+ "prebuild": "rm -rf dist",
24
+ "build": "tsc -p tsconfig.build.json && node -e \"import('node:fs').then(fs=>fs.chmodSync('dist/cli.js',0o755))\"",
25
+ "test": "vitest run",
26
+ "typecheck": "tsc --noEmit"
27
+ },
28
+ "engines": {
29
+ "node": ">=18.0.0"
30
+ },
31
+ "dependencies": {
32
+ "@x12i/docify-core": "^1.0.1",
33
+ "@x12i/docify-sdk": "^1.0.1"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^20.14.0",
37
+ "typescript": "^5.6.0",
38
+ "vitest": "^2.1.0"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "registry": "https://registry.npmjs.org/"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+ssh://git@github.com/x12i/npm.git",
47
+ "directory": "xops-docs/packages/xops-docs"
48
+ },
49
+ "keywords": [
50
+ "x12i",
51
+ "xops",
52
+ "docs",
53
+ "knowledge",
54
+ "devDependency",
55
+ "docify"
56
+ ],
57
+ "license": "MIT"
58
+ }