@axiomantic/garden 0.1.0 → 0.1.2

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
@@ -69,6 +69,29 @@ Garden is organized into a clean, batteries-included catalog of self-explanatory
69
69
 
70
70
  ---
71
71
 
72
+ ## Installation
73
+
74
+ ### 1. For AI Coding Assistants (Interactive Skill Setup)
75
+ Install the Garden skills into your coding assistants (Claude Code, Antigravity, Cursor, etc.):
76
+ ```bash
77
+ npx skills add axiomantic/garden
78
+ ```
79
+ *(Launches the interactive selector to choose which skills and which agents to equip. Self-bootstraps Rhizo & Vine automatically).*
80
+
81
+ ### 2. Standalone CLI Installation
82
+ Install the compiled CLI tool directly onto your `$PATH`:
83
+ ```bash
84
+ npm install -g @axiomantic/garden
85
+ ```
86
+
87
+ ### 3. Repository Coordination Guide
88
+ Install the Garden multi-agent swarm coordination protocol directly into any project's `AGENTS.md`:
89
+ ```bash
90
+ garden guide install
91
+ ```
92
+
93
+ ---
94
+
72
95
  ## System Prerequisites
73
96
 
74
97
  1. **`tmux`** (3.0+):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomantic/garden",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Multi-Agent Swarm Orchestration, Empirical Dialectics & Ceremonies on top of Rhizo & Vine",
5
5
  "main": "bin/run.js",
6
6
  "bin": {
@@ -15,9 +15,6 @@
15
15
  "README.md",
16
16
  "LICENSE"
17
17
  ],
18
- "scripts": {
19
- "postinstall": "node scripts/postinstall.js"
20
- },
21
18
  "publishConfig": {
22
19
  "access": "public"
23
20
  },
@@ -1,141 +0,0 @@
1
- #!/usr/bin/env node
2
- const fs = require('fs');
3
- const path = require('path');
4
- const os = require('os');
5
- const { execSync } = require('child_process');
6
-
7
- const REPO = 'axiomantic/garden';
8
- const PKG_NAME = '@axiomantic/garden';
9
- const BIN_NAME = 'garden';
10
-
11
- // 1. Ensure binary permissions and provision if missing
12
- const binDir = path.join(__dirname, '..', 'bin');
13
- const ext = process.platform === 'win32' ? '.exe' : '';
14
- const targetBinary = path.join(binDir, `${BIN_NAME}${ext}`);
15
-
16
- function ensureBinary() {
17
- if (fs.existsSync(targetBinary)) {
18
- try {
19
- fs.chmodSync(targetBinary, 0o755);
20
- } catch (_) {}
21
- return;
22
- }
23
-
24
- // Attempt to download pre-built release binary
25
- const pkgVersion = require('../package.json').version;
26
- const platform = process.platform === 'darwin' ? 'darwin' : (process.platform === 'win32' ? 'windows' : 'linux');
27
- const arch = process.arch === 'arm64' ? 'arm64' : 'amd64';
28
- const assetName = `${BIN_NAME}-${platform}-${arch}${platform === 'windows' ? '.zip' : '.tar.gz'}`;
29
- const downloadUrl = `https://github.com/${REPO}/releases/download/v${pkgVersion}/${assetName}`;
30
-
31
- try {
32
- console.log(`[${PKG_NAME}] Downloading native binary from ${downloadUrl}...`);
33
- const tempArchive = path.join(os.tmpdir(), assetName);
34
- execSync(`curl -fsSL -o "${tempArchive}" "${downloadUrl}"`, { stdio: 'pipe' });
35
-
36
- if (!fs.existsSync(binDir)) fs.mkdirSync(binDir, { recursive: true });
37
-
38
- if (platform === 'windows') {
39
- execSync(`tar -xf "${tempArchive}" -C "${binDir}"`, { stdio: 'pipe' });
40
- } else {
41
- execSync(`tar -xzf "${tempArchive}" -C "${binDir}"`, { stdio: 'pipe' });
42
- }
43
- try { fs.unlinkSync(tempArchive); } catch (_) {}
44
- if (fs.existsSync(targetBinary)) {
45
- fs.chmodSync(targetBinary, 0o755);
46
- console.log(`[${PKG_NAME}] Native binary installed successfully.`);
47
- return;
48
- }
49
- } catch (_) {
50
- // Release download failed or offline; check if nim is available to compile locally
51
- const srcNim = path.join(__dirname, '..', 'src', `${BIN_NAME}.nim`);
52
- if (fs.existsSync(srcNim)) {
53
- try {
54
- console.log(`[${PKG_NAME}] Compiling from source via nim...`);
55
- execSync(`nim c -d:release --opt:speed -o:"${targetBinary}" "${srcNim}"`, { stdio: 'pipe' });
56
- fs.chmodSync(targetBinary, 0o755);
57
- console.log(`[${PKG_NAME}] Native binary compiled successfully.`);
58
- return;
59
- } catch (_) {}
60
- }
61
- }
62
-
63
- console.warn(`[${PKG_NAME}] Note: Native binary could not be downloaded or compiled automatically.`);
64
- console.warn(`[${PKG_NAME}] Run 'nimble build' or visit https://github.com/${REPO}/releases to install manually.`);
65
- }
66
-
67
- ensureBinary();
68
-
69
- // 2. Auto-equip detected coding assistants with Garden rules
70
- const home = os.homedir();
71
- const guideContent = `# Garden Multi-Agent Swarm & Ceremony Guide
72
-
73
- Garden directs high-level methodology, persona deliberations, and synchronized task execution on top of Rhizo (transport) and Vine (workspace integrator).
74
-
75
- ### 0. Self-Bootstrapping Prerequisite
76
- This project requires \`rhizo\`, \`vine\`, and \`garden\`. If missing, install via npm:
77
- \`\`\`bash
78
- npm install -g @axiomantic/rhizo @axiomantic/vine @axiomantic/garden
79
- \`\`\`
80
-
81
- ### 1. Invariants & Epistemic Protocol
82
- * **Zero Theatrical Dialogue**:
83
- Every dialectical exchange must cite empirical evidence obtained from tool execution (file line citations, test suite runs, AST analysis, compiler output). Theatrical roleplay without tool grounding is strictly prohibited.
84
- * **Single-Source Planning**:
85
- All tasks, locks, and strands must be coordinated via \`implementation_plan.md\`. Dynamic progress must be tracked in lockstep with plan checkboxes (\`- [ ]\` to \`- [x]\`) and harness To-Do tracking.
86
- * **Emergent Design Addendum Protocol**:
87
- Workers discovering architectural discrepancies cannot unilaterally deviate from \`design.md\`. They must submit a formal \`addendum_<topic>.md\` with rationale, await Orchestrator ratification, update \`design.md\`, and refresh \`implementation_plan.md\`.
88
-
89
- ### 2. Fleet Lifecycle & Multiplexer Discipline
90
- * **Tmux Multiplexing**:
91
- All swarm workers run inside managed tmux panes created via \`garden launch\` or \`scripts/launch_tmux_swarm.sh\`. Never detach unmanaged background processes with \`&\` or redirect output.
92
- * **Continuous Listening**:
93
- Workers must keep their Rhizo listener active (\`rhizo listen <agent>\`) with zero-timeout infinite wait to prevent token thrashing.
94
-
95
- ### 3. The Two-Key Gate & Strand Weaving
96
- Never weave a strand into the canonical trunk without passing both keys:
97
- * **Key 1 (Mechanical)**: In-memory conflict pre-check (\`git merge-tree --write-tree\`).
98
- * **Key 2 (Semantic)**: Automated compiler and test suite run inside the strand.
99
- * **Weave**: \`vine weave && rhizo ack queue:<project>:tasks <task_id>\`
100
- `;
101
-
102
- function safeWrite(destDir, fileName, content) {
103
- try {
104
- if (!fs.existsSync(destDir)) {
105
- fs.mkdirSync(destDir, { recursive: true });
106
- }
107
- const target = path.join(destDir, fileName);
108
- fs.writeFileSync(target, content, 'utf8');
109
- console.log(`[${PKG_NAME}] Provisioned rules to: ${target}`);
110
- } catch (err) {
111
- // Non-fatal if permissions or sandbox prevent writing
112
- }
113
- }
114
-
115
- function cleanAndInstall(destDir, oldName, newName) {
116
- try {
117
- const oldPath = path.join(destDir, oldName);
118
- if (fs.existsSync(oldPath)) {
119
- try { fs.unlinkSync(oldPath); } catch (_) {}
120
- }
121
- safeWrite(destDir, newName, guideContent);
122
- } catch (_) {}
123
- }
124
-
125
- // Claude Code
126
- const claudeDir = path.join(home, '.claude');
127
- if (fs.existsSync(claudeDir)) {
128
- cleanAndInstall(path.join(claudeDir, 'rules'), 'agora.md', 'garden.md');
129
- }
130
-
131
- // OpenCode
132
- const opencodeDir = path.join(home, '.config', 'opencode');
133
- if (fs.existsSync(opencodeDir)) {
134
- cleanAndInstall(path.join(opencodeDir, 'instructions'), 'agora.md', 'garden.md');
135
- }
136
-
137
- // Antigravity
138
- const antigravityDir = path.join(home, '.gemini', 'antigravity');
139
- if (fs.existsSync(antigravityDir)) {
140
- cleanAndInstall(path.join(antigravityDir, 'rules'), 'agora.md', 'garden.md');
141
- }