@chrisdudek/yg 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,81 @@
1
+ # @chrisdudek/yg
2
+
3
+ **Make your repository self-aware.**
4
+
5
+ Yggdrasil gives your repository a persistent semantic memory graph. The `yg` CLI
6
+ maintains the system's intent, rules, and boundaries in structured Markdown and
7
+ YAML inside `.yggdrasil/`. When an AI agent works on your code, Yggdrasil
8
+ deterministically assembles a precise context package for the exact component
9
+ the agent is modifying.
10
+
11
+ No API keys. No network dependency. Just local files, validation, and context
12
+ builds.
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install -g @chrisdudek/yg
18
+ ```
19
+
20
+ Requirements: Node.js 22+
21
+
22
+ ## Initialize
23
+
24
+ ```bash
25
+ cd your-project
26
+ yg init --platform <platform>
27
+ ```
28
+
29
+ Done. Your repository is now self-aware.
30
+
31
+ ## Quick Start
32
+
33
+ ```bash
34
+ yg init --platform cursor
35
+ yg tree --depth 1
36
+ yg validate
37
+ yg build-context --node orders/order-service
38
+ ```
39
+
40
+ ## Core Commands
41
+
42
+ **Reading and analysis:**
43
+
44
+ - `yg build-context --node <path>` — Assemble context package for a node
45
+ - `yg status` — Graph health summary
46
+ - `yg tree [--root <path>] [--depth N]` — Graph structure as tree
47
+ - `yg owner --file <path>` — Find which graph node owns a source file
48
+ - `yg deps --node <path>` — Forward dependency tree and materialization order
49
+ - `yg impact --node <path> [--simulate]` — Reverse dependencies and context impact
50
+
51
+ **Validation and drift:**
52
+
53
+ - `yg validate [--scope all|node-path]` — Structural integrity and completeness
54
+ - `yg drift [--scope all|node-path]` — Detect graph-to-file divergence
55
+ - `yg drift-sync --node <path>` — Record current file hash after resolving drift
56
+
57
+ **Session journal:**
58
+
59
+ - `yg journal-add --note "..." [--target <node-path>]` — Buffer a decision note
60
+ - `yg journal-read` — List pending journal entries
61
+ - `yg journal-archive` — Archive journal after consolidation
62
+
63
+ **Setup:**
64
+
65
+ - `yg init --platform <name>` — Initialize `.yggdrasil/` structure (once per repository)
66
+
67
+ Node paths are relative to `.yggdrasil/model/`. File paths are relative to the
68
+ repository root.
69
+
70
+ ## Supported Platforms
71
+
72
+ | Platform | Init | Rules location |
73
+ | ----------- | -------------------------------- | --------------------------------- |
74
+ | Cursor | `yg init --platform cursor` | `.cursor/rules/yggdrasil.mdc` |
75
+ | Claude Code | `yg init --platform claude-code` | `AGENTS.md` (Yggdrasil section) |
76
+ | Copilot | `yg init --platform copilot` | `.github/copilot-instructions.md` |
77
+ | Generic | `yg init --platform generic` | `.yggdrasil/agent-rules.md` |
78
+
79
+ ## License
80
+
81
+ MIT
package/dist/bin.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node