@bytesbybrandon/living-docs 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Brandon D. Phillips
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,144 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # living-docs
2
+
3
+ [![CI](https://github.com/bytesbybrandon/living-docs/actions/workflows/ci.yml/badge.svg)](https://github.com/bytesbybrandon/living-docs/actions/workflows/ci.yml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
+
6
+ Turns a source document into a designed, self-contained HTML doc in one of three styles: an academic paper, dark reading notes, or a telemetry console.
7
+ Ships an AXI CLI and a stdio MCP server over the same core.
8
+
9
+ ---
10
+
11
+ ### Key Features
12
+
13
+ * **Three themes:** `paper-light` for papers and reports, `paper-dark` for reading notes and essays, `hud` for repo audits and system snapshots.
14
+ * **Generated visuals:** diagrams and charts render as inline SVG from a compact spec, and the console hero uses a seeded graph layout.
15
+ * **Per-source style tokens:** palette, seed color, type pairing, density, and figure treatment adapt a theme without arbitrary CSS. See [Style tokens](docs/guide/style-tokens.md).
16
+ * **One self-contained file:** inline CSS, inline SVG, no network assets, and print rules. See [Guarantees](docs/guide/guarantees.md).
17
+ * **Engine and interfaces:** the same core powers the CLI and the MCP server.
18
+
19
+ ### Tech Stack
20
+
21
+ * **Language:** JavaScript on Node.js 20 or newer, ECMAScript modules.
22
+ * **Rendering:** no UI framework and no build step; blocks, SVG, and theme CSS are plain JavaScript.
23
+ * **Dependencies:** `@modelcontextprotocol/sdk` for the MCP server and `unpdf` for PDF text extraction.
24
+ * **Tests:** the Node.js built-in test runner.
25
+
26
+ ### Table of Contents
27
+
28
+ 1. [Getting Started](#getting-started)
29
+ 2. [Usage](#usage)
30
+ 3. [Running Tests](#running-tests)
31
+ 4. [Project Structure](#project-structure)
32
+ 5. [Contributing](#contributing)
33
+ 6. [License](#license)
34
+
35
+ ---
36
+
37
+ ### Getting Started
38
+
39
+ Install the package globally or run it without installing.
40
+
41
+ #### Prerequisites
42
+
43
+ * Node.js 20 or newer.
44
+ * npm 10 or newer.
45
+
46
+ #### Installation
47
+
48
+ 1. **Install from npm:**
49
+ ```bash
50
+ npm install -g @bytesbybrandon/living-docs
51
+ ```
52
+ 2. **Or clone the repository:**
53
+ ```bash
54
+ git clone https://github.com/bytesbybrandon/living-docs.git
55
+ cd living-docs
56
+ ```
57
+ 3. **Install dependencies for a checkout:**
58
+ ```bash
59
+ npm install
60
+ ```
61
+ 4. **Environment setup:** none. The engine reads files and URLs only.
62
+
63
+ ---
64
+
65
+ ### Usage
66
+
67
+ #### Running Locally
68
+
69
+ Render the bundled samples:
70
+
71
+ ```bash
72
+ npm run samples
73
+ ```
74
+
75
+ That writes one HTML file per sample model into `docs/`.
76
+
77
+ #### Code Example
78
+
79
+ ```bash
80
+ node bin/living-docs-axi.js ingest samples/source/harness-notes.md --draft --theme paper-dark -o docs/note.model.json
81
+ node bin/living-docs-axi.js render docs/note.model.json --theme paper-dark -o docs/note.html
82
+ node bin/living-docs-axi.js preview docs
83
+ ```
84
+
85
+ With the published package, use `npx -y -p @bytesbybrandon/living-docs living-docs-axi` for each command.
86
+
87
+ Detailed references:
88
+
89
+ * [Pipeline](docs/guide/pipeline.md)
90
+ * [CLI reference](docs/guide/cli.md)
91
+ * [Document model](docs/guide/document-model.md)
92
+ * [Style tokens](docs/guide/style-tokens.md)
93
+ * [MCP server](docs/guide/mcp.md)
94
+ * [Reactive workflow](docs/guide/reactive-workflow.md)
95
+ * [Guarantees](docs/guide/guarantees.md)
96
+ * [Architecture](ARCHITECTURE.md)
97
+ * [Decisions](docs/decisions/0001-one-model-three-themes.md)
98
+
99
+ ---
100
+
101
+ ### Running Tests
102
+
103
+ ```bash
104
+ npm test
105
+ ```
106
+
107
+ The suite covers rendering determinism and self-containment, escaping and link sanitization, schema validation, ingest of Markdown, HTML, and text, CLI behavior and exit codes, an in-memory MCP client round trip, and style token resolution.
108
+
109
+ ---
110
+
111
+ ### Project Structure
112
+
113
+ ```text
114
+ living-docs/
115
+ bin/ CLI and MCP entry points
116
+ src/
117
+ axi/ command parsing, compact output, file writes, preview
118
+ ingest/ Markdown, text, HTML, URL, and PDF intake
119
+ mcp/ stdio MCP server and tool definitions
120
+ model/ document model schema, validator, safe inline Markdown
121
+ render/ block renderers, SVG generators, style resolution, themes
122
+ server/ local preview server
123
+ samples/ sample models and one Markdown source
124
+ scripts/ sample build script
125
+ tests/ Node test runner suites
126
+ docs/
127
+ decisions/ architecture decision records
128
+ guide/ user and contributor guides
129
+ ```
130
+
131
+ ---
132
+
133
+ ### Contributing
134
+
135
+ Contributions are welcome.
136
+ Read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for the fork, branch, test, and pull request workflow.
137
+ Repository agent rules live in [AGENTS.md](AGENTS.md), and module boundaries live in [ARCHITECTURE.md](ARCHITECTURE.md).
138
+
139
+ ---
140
+
141
+ ### License
142
+
143
+ Released under the MIT License.
144
+ See [LICENSE](LICENSE).
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { main } from '../src/axi/cli.js';
3
+
4
+ const output = await main(process.argv.slice(2));
5
+ if (output) process.stdout.write(output.endsWith('\n') ? output : output + '\n');
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { startStdioServer } from '../src/mcp/server.js';
3
+
4
+ startStdioServer().catch(error => {
5
+ process.stderr.write(`living-docs-mcp: ${error.stack || error.message}\n`);
6
+ process.exit(1);
7
+ });
package/package.json CHANGED
@@ -1,6 +1,57 @@
1
- {
2
- "name": "@bytesbybrandon/living-docs",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
1
+ {
2
+ "name": "@bytesbybrandon/living-docs",
3
+ "version": "0.1.0",
4
+ "description": "Turn a source document into a designed, self-contained living doc: academic paper, dark reading notes, or telemetry console. Ships an AXI CLI and an MCP server.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Brandon D. Phillips",
8
+ "engines": {
9
+ "node": ">=20"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/bytesbybrandon/living-docs.git"
14
+ },
15
+ "homepage": "https://github.com/bytesbybrandon/living-docs#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/bytesbybrandon/living-docs/issues"
18
+ },
19
+ "keywords": [
20
+ "agent",
21
+ "axi",
22
+ "mcp",
23
+ "documentation",
24
+ "html",
25
+ "pdf",
26
+ "living-docs",
27
+ "telemetry",
28
+ "paper"
29
+ ],
30
+ "bin": {
31
+ "living-docs-axi": "bin/living-docs-axi.js",
32
+ "living-docs-mcp": "bin/living-docs-mcp.js"
33
+ },
34
+ "exports": {
35
+ ".": "./src/index.js",
36
+ "./render": "./src/render/index.js",
37
+ "./ingest": "./src/ingest/index.js"
38
+ },
39
+ "files": [
40
+ "bin",
41
+ "src",
42
+ "samples",
43
+ "README.md",
44
+ "LICENSE"
45
+ ],
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "scripts": {
50
+ "test": "node --test tests/cli.test.js tests/ingest.test.js tests/mcp.test.js tests/render.test.js tests/style.test.js tests/validate.test.js",
51
+ "samples": "node scripts/build-samples.js"
52
+ },
53
+ "dependencies": {
54
+ "@modelcontextprotocol/sdk": "^1.32.2",
55
+ "unpdf": "^2.1.0"
56
+ }
57
+ }
@@ -0,0 +1,274 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "theme": "hud",
4
+ "meta": {
5
+ "title": "AI CONFIGS / OPEN SOURCE",
6
+ "style": { "palette": "ocean", "type": "mono", "density": "normal", "figure": "solid" },
7
+ "kicker": "SRC GITHUB · 5 TEAMS · 5 REPOS · 548.4K STARS · $0",
8
+ "runningHead": "AI configs · open source audit",
9
+ "date": "2026-11-10",
10
+ "footer": "living-docs · hud"
11
+ },
12
+ "blocks": [
13
+ {
14
+ "type": "graphScene",
15
+ "title": "AI CONFIGS / OPEN SOURCE",
16
+ "meta": ["SRC GITHUB", "5 TEAMS", "5 REPOS", "548.4K STARS", "$0"],
17
+ "tabs": [
18
+ { "label": "MATT" },
19
+ { "label": "ADDY", "active": true },
20
+ { "label": "CLOUDFLARE" },
21
+ { "label": "OBSIDIAN" },
22
+ { "label": "GOOGLE" }
23
+ ],
24
+ "command": "npx skills add adyosmani/agent-skills",
25
+ "graph": {
26
+ "counts": "5,932 NODES · 10,231 LINKS",
27
+ "azimuth": "AZ 154.1° Z 227",
28
+ "seed": 11,
29
+ "nodeCount": 210,
30
+ "labels": [
31
+ "ci-cd-and-automation",
32
+ "idea-refine",
33
+ "debugging-and-error-recovery",
34
+ "spec-driven-development",
35
+ "code-review-and-quality",
36
+ "design-doc",
37
+ "interview-me",
38
+ "context-engineering"
39
+ ],
40
+ "active": {
41
+ "id": "shipping-and-launch",
42
+ "badge": "/ MATCHED",
43
+ "card": {
44
+ "title": "shipping-and-launch",
45
+ "rows": [
46
+ { "k": "REPO", "v": "adyosmani/agent-skills" },
47
+ { "k": "KIND", "v": "SHIP" },
48
+ { "k": "DOES", "v": "checklists before anything goes live" }
49
+ ],
50
+ "footer": "ADDY"
51
+ }
52
+ }
53
+ },
54
+ "action": { "label": "ship it", "right": "ADDY OSMANI" },
55
+ "status": {
56
+ "seq": "03.80",
57
+ "kind": "skill",
58
+ "text": "shipping-and-launch matched",
59
+ "tail": "adyosmani/agent-skills"
60
+ }
61
+ },
62
+ {
63
+ "type": "panels",
64
+ "columns": 4,
65
+ "items": [
66
+ {
67
+ "index": "01",
68
+ "title": "REPO",
69
+ "tag": "02 / 05",
70
+ "kind": "repo",
71
+ "data": {
72
+ "name": "adyosmani/agent-skills",
73
+ "stars": "113.9K",
74
+ "by": "by Ady Osmani",
75
+ "note": "production-grade engineering skills for AI coding agents"
76
+ }
77
+ },
78
+ {
79
+ "index": "02",
80
+ "title": "STAR BOARD",
81
+ "tag": "LIVE",
82
+ "kind": "bars",
83
+ "data": {
84
+ "rows": [
85
+ { "label": "MAT", "value": 307.2, "display": "307.2K" },
86
+ { "label": "ADY", "value": 113.9, "display": "113.9K", "active": true },
87
+ { "label": "CFL", "value": 63.9, "display": "63.9K" },
88
+ { "label": "OBS", "value": 50.0, "display": "50.0K" },
89
+ { "label": "GBL", "value": 13.4, "display": "13.4K" }
90
+ ]
91
+ }
92
+ },
93
+ {
94
+ "index": "03",
95
+ "title": "SKILL INSPECTOR",
96
+ "tag": "TRACE",
97
+ "kind": "list",
98
+ "data": {
99
+ "title": "shipping-and-launch",
100
+ "rows": [
101
+ { "k": "KIND", "v": "SHIP" },
102
+ { "k": "DOES", "v": "checklists before anything goes live" }
103
+ ]
104
+ }
105
+ },
106
+ {
107
+ "index": "04",
108
+ "title": "SKILL RADAR",
109
+ "tag": "SCAN",
110
+ "kind": "radar",
111
+ "data": {
112
+ "value": "25",
113
+ "max": 25,
114
+ "sub": "SKILLS",
115
+ "subvalue": "02",
116
+ "subvalueLabel": "REPO",
117
+ "found": "found 25 / 25"
118
+ }
119
+ },
120
+ {
121
+ "index": "05",
122
+ "title": "SKILL TREE",
123
+ "tag": "25 SKILLS",
124
+ "kind": "tree",
125
+ "data": {
126
+ "root": "adyosmani/agent-skills/",
127
+ "items": [
128
+ { "name": "spec-driven-development/", "tag": "SKILL.md" },
129
+ { "name": "test-driven-development/", "tag": "SKILL.md" },
130
+ { "name": "code-review-and-quality/", "tag": "SKILL.md" },
131
+ { "name": "shipping-and-launch/", "tag": "SKILL.md", "active": true },
132
+ { "name": "interview-me/", "tag": "SKILL.md" },
133
+ { "name": "idea-refine/", "tag": "SKILL.md" },
134
+ { "name": "context-engineering/", "tag": "SKILL.md" }
135
+ ]
136
+ }
137
+ },
138
+ {
139
+ "index": "06",
140
+ "title": "AGENT LOG",
141
+ "tag": "TAIL · F",
142
+ "kind": "log",
143
+ "data": {
144
+ "lines": [
145
+ { "n": 18, "verb": "add", "text": "adyosmani/agent-skills" },
146
+ { "n": 21, "verb": "define", "text": "spec-driven-development" },
147
+ { "n": 22, "verb": "plan", "text": "break into tasks" },
148
+ { "n": 23, "verb": "build", "text": "tests drive the impl" },
149
+ { "n": 24, "verb": "review", "text": "quality gate passed" },
150
+ { "n": 25, "verb": "ship", "text": "launch checklist" }
151
+ ]
152
+ }
153
+ },
154
+ {
155
+ "index": "07",
156
+ "title": "COVERAGE",
157
+ "tag": "REPOS × JOBS",
158
+ "kind": "heat",
159
+ "data": {
160
+ "cols": ["SPEC", "TEST", "REVI", "AUDI", "NOTE", "DESI"],
161
+ "rows": ["MAT", "ADY", "CFL", "OBS", "GBL"],
162
+ "cells": [
163
+ [true, true, true, false, true, true],
164
+ [true, true, true, true, true, true],
165
+ [false, false, true, true, false, true],
166
+ [true, false, false, true, true, false],
167
+ [true, true, false, false, false, true]
168
+ ],
169
+ "footer": "5 / 6 JOBS · ADY"
170
+ }
171
+ },
172
+ {
173
+ "index": "08",
174
+ "title": "FREE STARS",
175
+ "tag": "GITHUB",
176
+ "kind": "big",
177
+ "data": { "value": "421.1K", "note": "stars · 0 prompts from zero" }
178
+ },
179
+ {
180
+ "index": "09",
181
+ "title": "SKILL.md",
182
+ "tag": "YAML",
183
+ "kind": "code",
184
+ "data": {
185
+ "file": "SKILL.md",
186
+ "tag": "YAML",
187
+ "lines": [
188
+ "---",
189
+ "name: shipping-and-launch",
190
+ "description: checklists before anything goes live",
191
+ "kind: SHIP",
192
+ "---",
193
+ "",
194
+ "# trigger",
195
+ "\"ship it\"",
196
+ "",
197
+ "-> load -> run -> verify"
198
+ ]
199
+ }
200
+ },
201
+ {
202
+ "index": "10",
203
+ "title": "TOKEN STREAM",
204
+ "tag": "LIVE",
205
+ "kind": "hist",
206
+ "data": {
207
+ "values": [22, 38, 51, 30, 44, 39, 63, 52, 41, 68, 58, 73, 46, 88, 62, 70, 95, 81],
208
+ "activeIndex": 17,
209
+ "rate": "2.1k tok/s",
210
+ "note": "ctx 43%",
211
+ "footer": "cache hit 94.0%"
212
+ }
213
+ },
214
+ {
215
+ "index": "11",
216
+ "title": "RUN METRICS",
217
+ "tag": "SESSION",
218
+ "kind": "metrics",
219
+ "data": {
220
+ "groups": [
221
+ { "label": "PHASES", "value": "6/6" },
222
+ { "label": "TASKS", "value": "12" },
223
+ { "label": "CHECKS", "value": "18" },
224
+ { "label": "FROM ZERO", "value": "0" }
225
+ ]
226
+ }
227
+ },
228
+ {
229
+ "index": "12",
230
+ "title": "GIT DIFF",
231
+ "tag": "HEAD",
232
+ "kind": "diff",
233
+ "data": {
234
+ "head": "commit b2daba",
235
+ "lines": [
236
+ { "sign": "+", "text": "agent-skills/shipping-and-launch/SKILL.md" },
237
+ { "sign": "+", "text": "+72 lines · 0 from scratch" },
238
+ { "sign": "-", "text": "0x3e88 21 8a 4d cc 1e 79 ed 59" },
239
+ { "sign": "+", "text": "0x3e88 31 22 47 fa fb d3 e4" }
240
+ ]
241
+ }
242
+ }
243
+ ]
244
+ },
245
+ {
246
+ "type": "ticker",
247
+ "text": "03.80 skill :: shipping-and-launch matched · adyosmani/agent-skills · coverage 5/6 · 421.1K stars · cache 94.0%"
248
+ },
249
+ {
250
+ "type": "heading",
251
+ "title": "What this snapshot measures",
252
+ "level": 2
253
+ },
254
+ {
255
+ "type": "prose",
256
+ "markdown": "This page is a single moment in a repository audit: one matched skill, its repository, and the run that surfaced it. Every number on the console is a fact about that snapshot, not a projection. The graph counts nodes and links across five repositories; the coverage grid marks which job families each repository actually covers."
257
+ },
258
+ {
259
+ "type": "stats",
260
+ "items": [
261
+ { "label": "Repositories scanned", "value": "5", "note": "github" },
262
+ { "label": "Skills indexed", "value": "25", "note": "SKILL.md" },
263
+ { "label": "Stars in scope", "value": "548.4K" },
264
+ { "label": "Cost", "value": "$0", "note": "local reads" }
265
+ ]
266
+ },
267
+ {
268
+ "type": "callout",
269
+ "tone": "note",
270
+ "title": "Reading the console",
271
+ "body": "Panels are independent: each one answers a different question about the same snapshot. The hero graph shows adjacency, not importance; the coverage grid is the only panel that scores completeness."
272
+ }
273
+ ]
274
+ }