@totoroyyb/amag 0.1.1 → 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/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) <year> Adam Veldhousen
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
13
+ all 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
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -101,11 +101,24 @@ Agent: [structural scan → module deep-dives → synthesizes architecture doc]
101
101
 
102
102
  ## External Agent Integration
103
103
 
104
- AMAG can delegate to external CLI agents (Claude, Codex, Gemini) for plan review and debugging consultation. Configure via:
104
+ AMAG can delegate work to external CLI agents Claude, Codex, or Gemini to get a second opinion from a different model. This happens in two contexts:
105
+
106
+ **Plan review** (`/plan` workflow):
107
+ 1. **Consultant** — before the plan is generated, an external agent analyzes your requirements for gaps, ambiguities, and missing edge cases
108
+ 2. **Critic** — after the plan is generated, a different external agent stress-tests it for executability, missing references, and unrealistic assumptions
109
+
110
+ **Debug consultation** (`/debug` workflow):
111
+ - When debugging stalls after multiple failed hypotheses, AMAG sends the full debug context to an external agent for fresh analysis
112
+ - Trigger manually with `/debug-escalate` or let the workflow offer it at a natural checkpoint
113
+
114
+ Each external call includes full project context, retry logic (up to 3 attempts), and a configurable thinking level that controls how deeply the external model reasons.
115
+
116
+ ### Configuration
105
117
 
106
118
  ```bash
107
119
  npx @totoroyyb/amag config show # View current config
108
120
  npx @totoroyyb/amag config set review.consultant.cli claude # Set plan consultant
121
+ npx @totoroyyb/amag config set review.critic.cli codex # Set plan critic
109
122
  npx @totoroyyb/amag config set debug.consultant.cli codex # Set debug consultant
110
123
  npx @totoroyyb/amag config set review.critic.thinking high # Set thinking level
111
124
  npx @totoroyyb/amag config reset # Reset to defaults
@@ -113,6 +126,20 @@ npx @totoroyyb/amag config reset # Reset to default
113
126
 
114
127
  Thinking levels: `max`, `high`, `medium`, `low`, `none`.
115
128
 
129
+ Configuration is stored in `.amag/config.json` in your project root. This file is created during `init` or `update` with sensible defaults. You can modify it via the CLI commands above or edit the JSON directly.
130
+
131
+ ### Prerequisites
132
+
133
+ External agent features require the corresponding CLI tools to be installed and authenticated on your machine:
134
+
135
+ | CLI | Install | Auth |
136
+ |-----|---------|------|
137
+ | [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) | `curl -fsSL https://claude.ai/install.sh \| bash` | Run `claude` and follow the OAuth login prompt |
138
+ | [Codex CLI](https://github.com/openai/codex) | `npm install -g @openai/codex` | `codex login` |
139
+ | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm install -g @google/gemini-cli` | You might need to login with `gemini` CLI first |
140
+
141
+ If no external CLI is configured or available, AMAG falls back to native single-agent review — everything still works, just without the multi-model perspective.
142
+
116
143
  ## CLI Reference
117
144
 
118
145
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totoroyyb/amag",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Agent orchestration for Antigravity — curated rules, workflows, and skills via a CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -156,7 +156,7 @@ WRONG: Sequential when parallel is possible
156
156
  | Communicate with user | `notify_user` | Only way to talk during task mode |
157
157
  | Deep codebase research | `codebase-explorer` skill | Structured parallel search — load when exploring unfamiliar code |
158
158
  | External docs / OSS search | `external-researcher` skill | Official docs + production examples — load for unfamiliar libraries |
159
- | Run external CLI agents | `external-cli-runner` skill | Backend detection, command dispatch, 3-retry logic — load when delegating to claude/codex/gemini-cli |
159
+ | Run external CLI agents | `external-cli-runner` skill | Backend detection, command dispatch, 3-retry logic — load when delegating to claude/codex/gemini |
160
160
  | Architecture decisions / hard debugging | `architecture-advisor` skill | Read-only consulting mode — load after 2+ failed attempts or for system design |
161
161
  | Systematic debugging | `/debug` workflow | 6-phase root cause analysis with user-triggered escalation — auto-engaged for hard bugs, or invoked explicitly |
162
162
  | Large-scale codebase understanding | `/explore` workflow | Multi-phase read-only exploration — auto-engaged for system-level understanding or explicit `/explore`. Never writes code |
@@ -5,7 +5,7 @@ description: Unified external CLI agent runner — backend detection, command di
5
5
 
6
6
  # External CLI Runner
7
7
 
8
- Reusable infrastructure for spawning external CLI agents (claude, codex, gemini-cli). Handles backend detection, command construction, thinking level mapping, retry-on-failure (up to 3 attempts), and response parsing.
8
+ Reusable infrastructure for spawning external CLI agents (claude, codex, gemini). Handles backend detection, command construction, thinking level mapping, retry-on-failure (up to 3 attempts), and response parsing.
9
9
 
10
10
  **Any skill that needs to delegate work to an external CLI agent should load this skill** instead of implementing CLI invocation directly.
11
11
 
@@ -67,7 +67,7 @@ Read `model` and `thinking` from config. Map thinking level, build command, exec
67
67
 
68
68
  | Config value | claude `--effort` | codex `-c model_reasoning_effort` | gemini behavior |
69
69
  |---|---|---|---|
70
- | `max` | `high` | `high` | Default |
70
+ | `max` | `max` | `high` | Default |
71
71
  | `high` | `high` | `high` | Default |
72
72
  | `medium` | `medium` | `medium` | Default |
73
73
  | `low` | `low` | `low` | Default |
@@ -85,17 +85,12 @@ run_command: claude --print --model {model} --effort {thinking_mapped} --fallbac
85
85
 
86
86
  **Codex:**
87
87
  ```
88
- run_command: codex exec --full-auto -m {model} -c model_reasoning_effort="{thinking_mapped}" -o {responseFileRaw} < {requestFile}
89
- ```
90
-
91
- If `-o` flag is not available on the installed version, fall back to stdout redirect:
92
- ```
93
88
  run_command: codex exec --full-auto -m {model} -c model_reasoning_effort="{thinking_mapped}" < {requestFile} > {responseFileRaw} 2>&1
94
89
  ```
95
90
 
96
91
  **Gemini CLI:**
97
92
  ```
98
- run_command: cat {requestFile} | gemini --yolo > {responseFileRaw} 2>&1
93
+ run_command: cat {requestFile} | gemini -m {model} --yolo > {responseFileRaw} 2>&1
99
94
  ```
100
95
 
101
96
  ### Execution Protocol