@totoroyyb/amag 0.1.2 → 0.1.3

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,9 +1,13 @@
1
+ <div align="center">
2
+
1
3
  # AMAG: All Mighty AntiGravity
2
4
 
3
5
  Agent orchestration for [Antigravity](https://antigravity.google). Curated rules, workflows, and skills that transform Antigravity's AI agent into a disciplined engineering partner.
4
6
 
5
7
  Inspired by [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) — rebuilt from scratch for Antigravity's native tooling.
6
8
 
9
+ </div>
10
+
7
11
  ## Quick Start
8
12
 
9
13
  ```bash
@@ -126,7 +130,8 @@ npx @totoroyyb/amag config reset # Reset to default
126
130
 
127
131
  Thinking levels: `max`, `high`, `medium`, `low`, `none`.
128
132
 
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.
133
+ > [!NOTE]
134
+ > 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
135
 
131
136
  ### Prerequisites
132
137
 
@@ -138,7 +143,8 @@ External agent features require the corresponding CLI tools to be installed and
138
143
  | [Codex CLI](https://github.com/openai/codex) | `npm install -g @openai/codex` | `codex login` |
139
144
  | [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
145
 
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.
146
+ > [!TIP]
147
+ > 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
148
 
143
149
  ## CLI Reference
144
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totoroyyb/amag",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Agent orchestration for Antigravity — curated rules, workflows, and skills via a CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -173,6 +173,10 @@ When a command runs in the background (build, test suite, compilation):
173
173
  4. **See `error-recovery.md` Long-Running Command Protocol** for the full decision tree.
174
174
  5. **External CLI agents are exempt** — the poll-and-kill heuristic does not apply to external agent invocations (Claude, Codex, Gemini). Those use a wall-clock timeout defined in `external-cli-runner` skill. Do not kill an external agent just because it hasn't produced output for 2 polls.
175
175
 
176
+ ### Auto-Safe Paths
177
+
178
+ Writes to the `.amag/` directory (creating, updating, archiving plan files) are always safe. Set `SafeToAutoRun: true` for any `run_command` targeting `.amag/`. File writes to `.amag/` should always use `Complexity: 1` — they are routine state updates, not destructive operations.
179
+
176
180
  ### Exploration Protocol
177
181
 
178
182
  When investigating unfamiliar code, launch 3+ parallel searches from different angles:
@@ -7,9 +7,13 @@ description: Implementation plan template — referenced by /plan workflow Step
7
7
  ## TL;DR
8
8
 
9
9
  > **Goal**: [1-2 sentences: core objective]
10
+ >
10
11
  > **Deliverables**: [Bullet list of concrete outputs]
12
+ >
11
13
  > **Effort**: Quick | Short | Medium | Large | XL
14
+ >
12
15
  > **Parallel Execution**: YES - N waves | NO - sequential
16
+ >
13
17
  > **Critical Path**: Task A → Task B → Task C
14
18
 
15
19
  ---
@@ -216,3 +216,10 @@ After processing the consultant response, present this summary to the user via `
216
216
 
217
217
  **No gaps found** ← If all clear
218
218
  ```
219
+
220
+ ## Review Archive
221
+
222
+ After all gaps are resolved and the plan has been generated, archive consultant review files:
223
+ ```
224
+ run_command: mkdir -p .amag/archive/reviews/{planId} && mv .amag/reviews/{planId}-consultant-* .amag/archive/reviews/{planId}/
225
+ ```
@@ -159,6 +159,10 @@ Read `.amag/reviews/{planId}-critic-response.md` via `view_file`.
159
159
 
160
160
  ### If APPROVE:
161
161
  - Log: "Plan critic: APPROVE — plan is ready"
162
+ - Archive review files:
163
+ ```
164
+ run_command: mkdir -p .amag/archive/reviews/{planId} && mv .amag/reviews/{planId}-critic-* .amag/archive/reviews/{planId}/
165
+ ```
162
166
  - Proceed to plan approval / start-work
163
167
 
164
168
  ### If REVISE:
@@ -217,9 +221,3 @@ If APPROVE:
217
221
  - Executability: [All tasks have starting points]
218
222
  ```
219
223
 
220
- ## Review Archive
221
-
222
- After plan is approved, archive review files:
223
- ```
224
- run_command: mkdir -p .amag/archive/reviews/{planId} && mv .amag/reviews/{planId}-* .amag/archive/reviews/{planId}/
225
- ```
@@ -31,6 +31,11 @@ Skip the automatic escalation chain and immediately consult an external agent fo
31
31
 
32
32
  5. **On failure**: report to user with all context gathered so far
33
33
 
34
+ 6. **Archive review files** after consultation completes (success or failure):
35
+ ```
36
+ run_command: mkdir -p .amag/archive/reviews && mv .amag/reviews/debug-{timestamp}-* .amag/archive/reviews/
37
+ ```
38
+
34
39
  ## Keyword Aliases
35
40
 
36
41
  These phrases are treated identically to `/debug-escalate`:
@@ -148,8 +148,6 @@ grep_search("verdict:", ".amag/reviews/{planId}-consultant-response.md")
148
148
  - **MINOR** → fix silently, note in plan
149
149
  - **AMBIGUOUS** → apply default, disclose in plan
150
150
 
151
- **Do not generate `implementation_plan.md` until all CRITICAL gaps are resolved.**
152
-
153
151
  ---
154
152
 
155
153
  ## Step 7: Generate Plan
@@ -158,16 +156,7 @@ grep_search("verdict:", ".amag/reviews/{planId}-consultant-response.md")
158
156
  > [!CAUTION]
159
157
  > **Template compliance is MANDATORY.** Read `.agent/resources/plan-template.md` via `view_file` NOW. The plan MUST follow that template's structure exactly. Deviating makes the plan invalid.
160
158
 
161
- Create `implementation_plan.md` artifact using the template structure. **Every section MUST be present:**
162
-
163
- 1. `## TL;DR` — Goal, Deliverables, Effort, Parallel info, Critical path
164
- 2. `## Requirements Summary` → Must Have + Must NOT Have (Guardrails)
165
- 3. `## Test Strategy` — Infrastructure, automated tests, agent-executed QA
166
- 4. `## Plan Consultant Summary` — Gaps resolved before generation
167
- 5. `## Parallel Execution Waves` — Wave diagram with task tree
168
- 6. `## Implementation Steps` — Per-task format: What to do, Must NOT do, Category/Skills/Wave, References (file:line), Acceptance Criteria (agent-executable), QA Scenarios (happy + failure with evidence paths)
169
- 7. `## Final Verification Wave` — FV1 (scope fidelity), FV2 (code quality), FV3 (QA replay)
170
- 8. `## Acceptance Criteria Summary` — All Must Have present, all Must NOT Have absent
159
+ Create `implementation_plan.md` artifact using the template structure. Every section in the template MUST be present — the post-generation compliance check below verifies this.
171
160
 
172
161
  ### Post-Generation Compliance Check
173
162
 
@@ -216,7 +205,7 @@ Plan is ready. How would you like to proceed?
216
205
  ---
217
206
 
218
207
  ## Step 9: Wait for Approval
219
- <!-- task_boundary: TaskStatus="Step 9/10: Waiting for user approval" -->
208
+ <!-- task_boundary: TaskStatus="Step 10/10: Waiting for user approval" -->
220
209
 
221
210
  Present plan via `notify_user` with `BlockedOnUser: true` and `ShouldAutoProceed: false`.
222
211
 
@@ -234,6 +223,11 @@ Present plan via `notify_user` with `BlockedOnUser: true` and `ShouldAutoProceed
234
223
 
235
224
  3. Status is `approved` — transitions to `in-progress` when `/start-work` begins.
236
225
 
226
+ 4. **Archive remaining review files** (catch-all safety net):
227
+ ```
228
+ run_command: [ "$(ls -A .amag/reviews/ 2>/dev/null)" ] && mkdir -p .amag/archive/reviews/{planId} && mv .amag/reviews/* .amag/archive/reviews/{planId}/ || true
229
+ ```
230
+
237
231
  ---
238
232
 
239
233
  ## STOP — Workflow Ends Here