@dujavi/ai-md 0.4.0 → 0.6.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 CHANGED
@@ -1,61 +1,73 @@
1
- # ai-md
1
+ # @dujavi/ai-md
2
2
 
3
3
  Public **AXI-shaped** CLI for a **private** personal AI config directory (`~/.ai-md`).
4
4
 
5
- | Layer | Path | Purpose |
6
- |-------|------|---------|
7
- | **System** | `skills/`, `rules/` | Global base — linked to `~/.cursor/{skills,rules}` |
8
- | **Templates** | `templates/<type>/` | Project-type starters (`base`, later `forms`, …) |
9
- | **Projects** | `projects/<name>/` | Per-app overlays (repo `.cursor` → here) |
5
+ Build merges `shared/` + `agents/<harness>/` into `dist/<harness>/`, then links live tool dirs at dist. **Only installed AIs are linked** (detect dirs/binaries); use `--force-link` to override.
10
6
 
11
- No personal content ships in this package. Reads default to TOON + `help[]` (`--json` available).
7
+ ## Layout (private repo)
12
8
 
13
- ## New machine
9
+ | Path | Role |
10
+ |------|------|
11
+ | `shared/{rules,skills}` | Cross-harness source |
12
+ | `agents/<id>/` | Harness-specific overlays (win on name conflict) |
13
+ | `dist/<id>/` | Generated (gitignored) — do not edit |
14
+ | `templates/<type>/` | Project starters |
15
+ | `projects/<name>/` | Per-app overlays (repo `.cursor` → here) |
16
+ | `scripts/` | Private machine scripts |
17
+
18
+ ## Unique vs shared live roots
19
+
20
+ | Live root | Harnesses | Notes |
21
+ |-----------|-----------|--------|
22
+ | `~/.cursor/{skills,rules}` | **cursor** only | Unique |
23
+ | `~/.claude/{skills,rules}` | **claude** only | Unique |
24
+ | `~/.gemini/skills` | **gemini** only | Unique |
25
+ | `~/.config/opencode/skills` | **opencode** only | Unique |
26
+ | `~/.copilot/skills` | **copilot** (stub) | Unique |
27
+ | `~/.agents/skills` | **agents** (writer); **codex** is an **alias** | Shared — emit once |
28
+
29
+ Cursor / Gemini / OpenCode may *also read* `~/.agents/skills`; enabling `agents` feeds them without a second copy under those tools’ unique roots (unless those harnesses are enabled too, which builds `shared/` into each unique dist).
30
+
31
+ ## Quick start
14
32
 
15
33
  ```bash
16
34
  npm i -g @dujavi/ai-md
17
- ai-md setup --remote https://github.com/<you>/.ai-md.git --tools
18
- # persists ~/.config/ai-md/config.json then clones + links (+ optional grok/quota-axi)
19
- ```
20
35
 
21
- Or step by step:
36
+ # A) No private remote yet
37
+ ai-md init
22
38
 
23
- ```bash
24
- ai-md config set --remote https://github.com/<you>/.ai-md.git --dir ~/.ai-md
25
- ai-md install
26
- ai-md ensure-tools
39
+ # B) Existing private git repo
40
+ ai-md setup --remote https://github.com/<you>/.ai-md.git
41
+
42
+ ai-md pull
43
+ # edit shared/ or agents/<id>/ only
44
+ ai-md build
45
+ ai-md push -m "why"
27
46
  ```
28
47
 
29
- Precedence: `--remote`/`--dir` flags > `AI_MD_*` env > `~/.config/ai-md/config.json` > defaults.
48
+ ## Commands
30
49
 
31
- ## Layout idea
50
+ | Command | Purpose |
51
+ |---------|---------|
52
+ | `init` / `seed-skeleton` | Scaffold / merge recommended base rules+skills |
53
+ | `build` | Emit `dist/` |
54
+ | `rescue` | Promote dirty dist → `agents/<id>/` |
55
+ | `install` / `pull` | Git + build + link **installed** harnesses |
56
+ | `doctor --fix` | Rebuild + repair links |
57
+ | `harness list\|show\|set\|enable\|disable` | Register or retarget any agent |
58
+ | `config set --link-mode symlink\|junction\|copy` | Platform link mode |
32
59
 
33
- ```text
34
- ~/.ai-md/
35
- skills/ # system — all agents see these
36
- rules/
37
- templates/
38
- base/ # default project starter (customizable stubs only)
39
- # forms/ … # other use cases
40
- projects/
41
- presenter/
42
- sendfolio/
43
- ```
60
+ Flags: `--agents cursor,claude`, `--force-link`, `--force` (discard dirty dist), `--dry-run`, `--json`.
44
61
 
45
- Put shared agentic skills/rules in **system** folders. Put only type-specific or per-project starters under **templates/**.
62
+ ## Platforms
46
63
 
47
- ## Commands
64
+ | OS | Default `linkMode` |
65
+ |----|-------------------|
66
+ | Linux / macOS / WSL | `symlink` |
67
+ | Windows | `junction` (fallback symlink → `copy`) |
48
68
 
49
- ```bash
50
- ai-md # status
51
- ai-md init-project --repo ~/app --from base
52
- ai-md apply-template --project app --from base
53
- ai-md doctor --fix --agents cursor,claude
54
- ai-md pull | push -m "why"
55
- ai-md ensure-tools
56
- ```
69
+ Run `ai-md` in the **same** environment as the IDE/CLI (Windows Cursor → Windows Node). WSL home ≠ Windows `%USERPROFILE%`.
57
70
 
58
- ## Environment
71
+ ## Edit policy
59
72
 
60
- - `AI_MD_DIR` / `AI_MD_REMOTE` override for one shot (also set by the CLI after reading config)
61
- - `AI_MD_CONFIG` — path to machine config JSON (default `~/.config/ai-md/config.json`)
73
+ Never edit live harness dirs or `dist/`. See seeded `shared/rules/edit-source-not-dist.mdc` and skill `ai-md-config`.