agemon 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 Korak-997
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 ADDED
@@ -0,0 +1,169 @@
1
+ # agemon
2
+
3
+ Bootstrap and reverse an AI coding agent environment in a repository with one CLI.
4
+
5
+ `agemon` installs a curated plugin bundle, tracks all managed actions in a state manifest,
6
+ and can cleanly reverse those actions with `nuke`.
7
+
8
+ ## What It Does
9
+
10
+ Current v0.1 behavior is plugin-driven and runs in this order:
11
+
12
+ 1. `crg`: installs and verifies `code-review-graph`.
13
+ 2. `daemon`: registers `crg-daemon` autostart via `systemd --user`.
14
+ 3. `skills`: installs bundled skills via `npx skills`.
15
+ 4. `workflow-scaffolder`: writes bundled GitHub workflow files.
16
+ 5. `cli-tool`: installs bundled global CLI tools.
17
+ 6. `master-prompt`: consolidates agent rule files and pointer files.
18
+
19
+ Every mutating plugin action is recorded in `.agemon/state.json` and used by `nuke` for
20
+ targeted reversal.
21
+
22
+ ## Requirements
23
+
24
+ - Linux with Ubuntu (`/etc/os-release` must report `ID=ubuntu`).
25
+ - Node.js `>=24`.
26
+ - `npx`.
27
+ - Binaries checked at runtime: `python3`, `pip`, `pipx`, `uv`, `crg`.
28
+
29
+ Notes:
30
+ - The CLI reports binary availability but does not auto-install missing dependencies.
31
+ - Unsupported platforms exit with a clear error message.
32
+
33
+ ## Install
34
+
35
+ Install in the current repository:
36
+
37
+ ```bash
38
+ npx agemon@latest install
39
+ ```
40
+
41
+ Or use the local preflight script:
42
+
43
+ ```bash
44
+ sh ./install.sh
45
+ ```
46
+
47
+ ## CLI Usage
48
+
49
+ `install` is the default command:
50
+
51
+ ```bash
52
+ agemon [options]
53
+ ```
54
+
55
+ Reverse managed changes:
56
+
57
+ ```bash
58
+ agemon nuke [options]
59
+ ```
60
+
61
+ ### Global Options
62
+
63
+ - `--dry-run`: narrate actions without making changes.
64
+ - `--yes`: skip confirmation prompts.
65
+ - `--only <plugins>`: run only a comma-separated subset of plugins.
66
+ - `--skip-daemon`: skip daemon registration during install.
67
+ - `--no-color`: disable ANSI colors.
68
+ - `-v, --verbose`: show raw subprocess output beneath each step.
69
+ - `-q, --quiet`: reduce output to minimal step/final lines.
70
+
71
+ Examples:
72
+
73
+ ```bash
74
+ # See planned actions only
75
+ npx agemon@latest install --dry-run
76
+
77
+ # Install only skills and workflows
78
+ npx agemon@latest install --only skills,workflow-scaffolder
79
+
80
+ # Reverse only specific plugins
81
+ npx agemon@latest nuke --only skills,workflow-scaffolder
82
+ ```
83
+
84
+ ## Reversibility Guarantees
85
+
86
+ - `nuke` removes only agemon-managed artifacts tracked in `.agemon/state.json`.
87
+ - Pre-existing tools/files are detected and preserved.
88
+ - Master-prompt file edits are backed up in `.agemon/backups/master-prompt/` and restored
89
+ on uninstall.
90
+
91
+ ## Managed Outputs
92
+
93
+ By default, agemon may manage these paths:
94
+
95
+ - `.agemon/state.json`
96
+ - `.agemon/backups/master-prompt/*.bak`
97
+ - `.github/workflows/claude-code-security-review.yml`
98
+ - `.github/workflows/code-review-graph-action.yml`
99
+ - `AGENTS.md`
100
+ - `CLAUDE.md`
101
+ - `GEMINI.md`
102
+ - `.cursorrules`
103
+ - `.windsurfrules`
104
+
105
+ It also invokes external installers (`pipx`, `npm -g`, `npx skills`) when required.
106
+
107
+ ## Local Development
108
+
109
+ ```bash
110
+ npm install
111
+ npm run build
112
+ npm run typecheck
113
+ npm run lint
114
+ npm test
115
+ ```
116
+
117
+ Development CLI entrypoint:
118
+
119
+ ```bash
120
+ npm run dev -- --help
121
+ ```
122
+
123
+ ## Sandbox Harness
124
+
125
+ Use the sandbox harness for isolated, repeatable checks against fixtures in `test/fixtures`:
126
+
127
+ ```bash
128
+ # One run
129
+ npm run sandbox -- run clean-repo
130
+
131
+ # Dry-run simulation
132
+ npm run sandbox -- run clean-repo --dry-run
133
+
134
+ # Install + nuke roundtrip integrity
135
+ npm run sandbox -- roundtrip clean-repo
136
+
137
+ # Watch mode
138
+ npm run sandbox -- watch clean-repo
139
+
140
+ # Reset sandbox artifacts
141
+ npm run sandbox -- reset
142
+ ```
143
+
144
+ Useful sandbox flags:
145
+
146
+ - `--real`: execute real subprocesses/services instead of fake backends.
147
+ - `--trace`: map to verbose CLI output.
148
+ - `--quiet`: suppress captured terminal output.
149
+ - `--skip-daemon`: skip daemon plugin in the run.
150
+ - `--only <plugins>`: run selected plugins only.
151
+
152
+ ## Detailed Docs
153
+
154
+ - Architecture and operations: `docs/architecture-and-operations.md`
155
+ - Release process: `docs/releasing.md`
156
+ - Audit and review report: `docs/review-2026-08-13.md`
157
+ - Historical implementation plan: `docs/implementation-plan.md`
158
+
159
+ ## Roadmap Notes
160
+
161
+ Planned but not currently implemented:
162
+
163
+ - Dedicated `status` command.
164
+ - Dedicated `doctor` command.
165
+ - Native Windows/macOS platform support.
166
+
167
+ ## License
168
+
169
+ MIT
package/bin/agemon.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from "../dist/index.js";
3
+
4
+ process.exitCode = await runCli(process.argv.slice(2));