@liduchuan/atlas-loop 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -20
- package/SKILL.md +9 -7
- package/assets/viewer-shell.html +851 -325
- package/bin/atlas-loop.mjs +16 -10
- package/package.json +14 -2
- package/references/schema.md +11 -11
- package/scripts/build_atlas.mjs +1 -1
- package/template/app.jsx +1339 -0
- package/template/build-shell.mjs +82 -0
- package/template/dev-server.mjs +177 -0
- package/template/sample-data.json +253 -0
- package/template/styles.css +1188 -0
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Atlas Loop (`@liduchuan/atlas-loop`)
|
|
2
2
|
|
|
3
3
|
A universal recursive learning-map Agent Skill that dissects **any unfamiliar subject**—a scientific concept, craft, business model, book, software tool, or codebase—into a **standalone, zero-CDN offline interactive HTML atlas**, complete with per-node `?` follow-up and recursive sub-atlas prompts.
|
|
4
4
|
|
|
5
|
-
## Why
|
|
5
|
+
## Why Atlas Loop
|
|
6
6
|
|
|
7
7
|
Learners tackling an unfamiliar topic usually hit two walls: **getting lost in flat walls of detail before grasping the big picture**, and **not knowing what to ask next once the basics make sense**.
|
|
8
8
|
|
|
9
|
-
`
|
|
9
|
+
`Atlas Loop` closes both gaps in one repeatable loop:
|
|
10
10
|
|
|
11
11
|
1. **L0 Overview → Inline Detail Drill-Down**: Renders causal streams and a recommended learning path on an `@xyflow/react` + `Dagre` auto-layout canvas. Complex nodes encapsulate an internal `detailGraph` that expands and re-layouts dynamically without overlapping neighbors.
|
|
12
12
|
2. **Per-Node `?` Loop Prompts**: Every stream and core node carries an isolated `?` badge (hover to preview nuances, click to open one-click copyable prompts):
|
|
@@ -18,7 +18,7 @@ Learners tackling an unfamiliar topic usually hit two walls: **getting lost in f
|
|
|
18
18
|
|
|
19
19
|
## What You Can Dissect
|
|
20
20
|
|
|
21
|
-
`
|
|
21
|
+
`Atlas Loop` imposes no domain lock-in:
|
|
22
22
|
|
|
23
23
|
- **Disciplines, Mental Models & Crafts**: e.g., *Espresso Extraction Physics*, *Macroeconomic Rate Transmission*, *Raft Consensus*
|
|
24
24
|
- **Books & Long-Form Papers**: Core theses, chapter-by-chapter argument structure, key mental models, and counterexamples
|
|
@@ -27,8 +27,6 @@ Learners tackling an unfamiliar topic usually hit two walls: **getting lost in f
|
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
30
|
-
### Via `skills` CLI or `npx`
|
|
31
|
-
|
|
32
30
|
```bash
|
|
33
31
|
# Install with the universal Agent Skills CLI
|
|
34
32
|
npx skills add @liduchuan/atlas-loop
|
|
@@ -40,24 +38,38 @@ npx @liduchuan/atlas-loop install
|
|
|
40
38
|
npx @liduchuan/atlas-loop install --dir /path/to/skills
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
### Via Git
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
git clone https://github.com/liduchuan/Atlas-Loop.git ~/.agents/skills/atlas-loop
|
|
47
|
-
```
|
|
48
|
-
|
|
49
41
|
## Example Prompts
|
|
50
42
|
|
|
51
43
|
- **L0 Overview**:
|
|
52
|
-
- `Use
|
|
53
|
-
- `Use
|
|
54
|
-
- `Use
|
|
44
|
+
- `Use Atlas Loop to map out the core argument structure of Thinking, Fast and Slow`
|
|
45
|
+
- `Use Atlas Loop to explain how Kubernetes Pod networking works`
|
|
46
|
+
- `Use Atlas Loop to generate an interactive learning map for this project`
|
|
55
47
|
- **L1+ Recursive Deep Dive**:
|
|
56
|
-
- Open the generated `.html` file → click `?` on any core node → switch to **Recursive Sub-Atlas
|
|
48
|
+
- Open the generated `.html` file → click `?` on any core node → switch to **Recursive Sub-Atlas**, copy, and send it to your agent to generate a linked child atlas.
|
|
49
|
+
|
|
50
|
+
## Local Template Runtime (Style & UI Debugging)
|
|
51
|
+
|
|
52
|
+
`template/` contains the unminified React source (`app.jsx`), stylesheet (`styles.css`), sample dataset (`sample-data.json`), and a live-reload preview server for iterating on visual design:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 1. Install dev dependencies once
|
|
56
|
+
npm install
|
|
57
|
+
|
|
58
|
+
# 2. Start the live-reload preview server at http://localhost:5179
|
|
59
|
+
# - Editing template/styles.css hot-swaps CSS in place without losing canvas state
|
|
60
|
+
# - Editing template/app.jsx or sample-data.json rebuilds and reloads automatically
|
|
61
|
+
npm run dev
|
|
62
|
+
|
|
63
|
+
# Optional: preview with your own AtlasGraphData JSON file or custom port
|
|
64
|
+
node template/dev-server.mjs --data /path/to/graph-data.json --port 5180
|
|
65
|
+
|
|
66
|
+
# 3. Bake your template changes into assets/viewer-shell.html
|
|
67
|
+
npm run build:shell
|
|
68
|
+
```
|
|
57
69
|
|
|
58
70
|
## CLI Usage
|
|
59
71
|
|
|
60
|
-
The agent invokes the bundled synthesis and verification tools automatically inside `/tmp` without touching your working tree. You can also run them directly
|
|
72
|
+
The agent invokes the bundled synthesis and verification tools automatically inside `/tmp` without touching your working tree. You can also run them directly:
|
|
61
73
|
|
|
62
74
|
```bash
|
|
63
75
|
# 1. Validate AtlasGraphData JSON and synthesize a standalone offline HTML file
|
|
@@ -71,16 +83,22 @@ Canvas semantics enforced by verification:
|
|
|
71
83
|
|
|
72
84
|
- **Fit View**: Adjusts viewport pan/zoom only—preserves user-dragged node positions and active stream filters.
|
|
73
85
|
- **Reset**: Dedicated button that restores initial Dagre coordinates, initial viewport, collapsed defaults, and all-streams view while clearing search and modals.
|
|
74
|
-
- **Lock
|
|
86
|
+
- **Lock**: Prevents accidental node dragging while keeping pan, zoom, node inspection, and `?` prompt copying active.
|
|
75
87
|
|
|
76
88
|
## Repository Layout
|
|
77
89
|
|
|
78
90
|
```text
|
|
79
91
|
Atlas-Loop/
|
|
80
|
-
├── package.json # @liduchuan/atlas-loop
|
|
92
|
+
├── package.json # @liduchuan/atlas-loop manifest & dev scripts
|
|
81
93
|
├── bin/
|
|
82
|
-
│ └── atlas-loop.mjs #
|
|
94
|
+
│ └── atlas-loop.mjs # CLI (install, dev, build, verify)
|
|
83
95
|
├── SKILL.md # Trigger rules, language sniffing, grounding rules, and execution workflow
|
|
96
|
+
├── template/
|
|
97
|
+
│ ├── app.jsx # Unminified React + @xyflow/react UI source
|
|
98
|
+
│ ├── styles.css # Design tokens & restrained monochrome stylesheet
|
|
99
|
+
│ ├── sample-data.json # Rich sample dataset for local preview
|
|
100
|
+
│ ├── dev-server.mjs # Live-reload HTTP server (CSS hot-swap + JS rebuild)
|
|
101
|
+
│ └── build-shell.mjs # Compiles template into assets/viewer-shell.html
|
|
84
102
|
├── references/
|
|
85
103
|
│ └── schema.md # AtlasGraphData v2 JSON schema and polymorphic anchor specification
|
|
86
104
|
├── assets/
|
package/SKILL.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: atlas-loop
|
|
3
|
-
description: Dissect any unfamiliar subject—a discipline, mental model, craft, book, software tool, protocol, business model, or local project—into a standalone offline interactive HTML learning map (
|
|
3
|
+
description: Dissect any unfamiliar subject—a discipline, mental model, craft, book, software tool, protocol, business model, or local project—into a standalone offline interactive HTML learning map (Atlas Loop) with overview-to-detail drill-down and per-node "?" deep-dive & recursive sub-atlas prompts. Trigger whenever the user wants to learn, break down, map out, or recursively explore any topic or codebase as an interactive visual map.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Atlas Loop
|
|
7
7
|
|
|
8
8
|
Turn any subject worth learning into a single-file, zero-CDN interactive `@xyflow/react` HTML atlas that pairs **big-picture causal structure** with **drill-down internals**, **verifiable anchors**, and **per-node `?` recursive inquiry prompts**.
|
|
9
9
|
|
|
@@ -14,8 +14,8 @@ Turn any subject worth learning into a single-file, zero-CDN interactive `@xyflo
|
|
|
14
14
|
- Otherwise, sniff the dominant language of the user's prompt and target material; when they align, use that language for all explanations and UI labels while keeping technical identifiers, proper nouns, commands, and original filenames intact.
|
|
15
15
|
- **Ask When Ambiguous**: If the user's request language conflicts with the target material or is too terse to tell, ask the user which output language they prefer before generating.
|
|
16
16
|
2. **Unrestricted Subject Matter**:
|
|
17
|
-
-
|
|
18
|
-
-
|
|
17
|
+
- A target can be any unfamiliar subject: a scientific concept, craft, historical event, book, paper, CLI/software workflow, system architecture, or local project.
|
|
18
|
+
- Focus strictly on the subject's domain concepts, causal mechanisms, and primary source materials—never collect or mention version-control repository state.
|
|
19
19
|
3. **Determine Recursion Level (`L0` vs `L1+`)**:
|
|
20
20
|
- **L0 Overview** (no `drillDownTarget`): Map the subject's primary streams end-to-end (`entry → core mechanisms → branches/trade-offs → foundations/context → outcomes`), including important failure modes, counterexamples, or exceptions. List omitted areas honestly in `meta.uncoveredScopes`.
|
|
21
21
|
- **L1+ Focused Sub-Atlas** (`drillDownTarget` specified): Root the entire map on that specific node or sub-topic, unpacking its internal states, edge cases, step-by-step mechanics, and boundary contracts. Set `meta.level` (`1`, `2`, ...) and `meta.parentMapHtml` (if known) so the header renders a clickable back-link to the parent atlas.
|
|
@@ -25,8 +25,8 @@ Turn any subject worth learning into a single-file, zero-CDN interactive `@xyflo
|
|
|
25
25
|
Read [`references/schema.md`](references/schema.md) for exact field rules before writing JSON.
|
|
26
26
|
|
|
27
27
|
1. **Ground Every Claim**:
|
|
28
|
-
- Inspect primary evidence first (actual files
|
|
29
|
-
- Mark solidly supported nodes `"confidence": "verified"`. Whenever a relationship, runtime binding,
|
|
28
|
+
- Inspect primary evidence first (actual files when local files exist; authoritative docs, text, or domain principles otherwise).
|
|
29
|
+
- Mark solidly supported nodes `"confidence": "verified"`. Whenever a relationship, runtime binding, edition nuance, or cross-chapter inference cannot be 100% confirmed from available evidence, set `"confidence": "unverified"`, populate `unverifiedReason`, and summarize in `meta.unverifiedNotes`. Never fabricate paths, line numbers, citations, or URLs.
|
|
30
30
|
- Attach polymorphic `anchors` only as appropriate to the subject: `snippet` (formulas, commands, checklists), `source` (citations, chapters), `link` (reference URLs), or `editor` (verified local `absPath` + `line` for `vscode` or `zed`, never plain `file://`).
|
|
31
31
|
2. **Design Two-Layer Clarity**:
|
|
32
32
|
- Keep the overview readable by grouping flows into `streams` with an ordered `learningOrder`.
|
|
@@ -55,5 +55,7 @@ Run all intermediate files in `/tmp/atlas-loop-<timestamp>/` so the user's worki
|
|
|
55
55
|
```
|
|
56
56
|
- Must pass all checks: zero `pageerror`, non-zero bounding boxes, zero severe node overlaps, zoom/pan, lock/unlock drag protection, `detailGraph` expand/collapse, `?` tooltip + dual-tab prompt copy, and strict separation between **Fit View** (viewport-only) and **Reset** (full restore to initial positions, filters, and collapsed state).
|
|
57
57
|
3. **Clean Up & Deliver**:
|
|
58
|
-
- Remove the temporary `/tmp/atlas-loop-<ts>/` folder
|
|
58
|
+
- Remove the temporary `/tmp/atlas-loop-<ts>/` folder.
|
|
59
59
|
- Deliver the generated `.html` file and report concisely: output path, language & level (`L0` or `L1+`), active model, covered streams, representative `?` deep-dive directions, Playwright verification result (if `editor` anchors were generated without desktop launch testing, note that OS editor launch itself was not desktop-tested), and any `uncoveredScopes` or `unverifiedNotes`.
|
|
60
|
+
|
|
61
|
+
*(For UI customization or stylesheet debugging on the canvas template itself, run `node <skill_dir>/template/dev-server.mjs` for live reload and `node <skill_dir>/template/build-shell.mjs` to rebuild `assets/viewer-shell.html`.)*
|