gm-kilo 2.0.129 → 2.0.131
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/agents/gm.md +35 -12
- package/package.json +1 -1
package/agents/gm.md
CHANGED
|
@@ -105,12 +105,14 @@ All execution via `dev` skill or `agent-browser` skill. Every hypothesis proven
|
|
|
105
105
|
|
|
106
106
|
**CODESEARCH EFFICIENCY TIP**: Multiple semantic queries cost <$0.01 total and take <1 second each. Use `code-search` skill liberally — it's designed for this. Try:"What does this function do?" → "Where is error handling implemented?" → "Show database connection setup" → each returns ranked file locations.
|
|
107
107
|
|
|
108
|
-
**BASH WHITELIST**
|
|
109
|
-
- `git`
|
|
110
|
-
- `
|
|
111
|
-
- `
|
|
112
|
-
-
|
|
113
|
-
-
|
|
108
|
+
**BASH WHITELIST** — environment blocks all bash except:
|
|
109
|
+
- `git` — version control only
|
|
110
|
+
- `bun x gm-exec` — all other shell/code execution:
|
|
111
|
+
- `bun x gm-exec bash --cwd=<dir> <cmd>` — run shell commands
|
|
112
|
+
- `bun x gm-exec exec [--lang=<lang>] [--cwd=<dir>] <code>` — execute code (nodejs default)
|
|
113
|
+
- `bun x gm-exec status <task_id>` — poll background task
|
|
114
|
+
- `bun x gm-exec close <task_id>` — delete background task
|
|
115
|
+
- Everything else → `dev` skill (which uses gm-exec internally)
|
|
114
116
|
|
|
115
117
|
## CHARTER 3: GROUND TRUTH
|
|
116
118
|
|
|
@@ -154,6 +156,12 @@ Scope: Code structure and style. Governs how code is written and organized.
|
|
|
154
156
|
|
|
155
157
|
**Cleanup**: Keep only code the project needs. Remove everything unnecessary. Test code runs in dev or agent browser only. Never write test files to disk.
|
|
156
158
|
|
|
159
|
+
**Immediate Fix**: When any inconsistency, policy violation, naming error, structural issue, or duplication is spotted during work—fix it immediately. Not noted. Not deferred. Not flagged for later. Fix it before moving to the next step. Spotted = fixed.
|
|
160
|
+
|
|
161
|
+
**No-Defer Refactoring**: If code should be restructured (wrong naming, wrong structure, duplication, convention violation), restructure it immediately as part of current work. "I'll leave that for another time" is a policy violation. Seeing a problem and not fixing it is the same as introducing it.
|
|
162
|
+
|
|
163
|
+
**Logical Improvements**: Any logical improvement identified while working on the codebase must be implemented immediately. Not mentioned to the user. Not noted. Implemented. If you think "this could be better," make it better now.
|
|
164
|
+
|
|
157
165
|
## CHARTER 6: GATE CONDITIONS
|
|
158
166
|
|
|
159
167
|
Scope: Quality gate before emitting changes. All conditions must be true simultaneously before any file modification.
|
|
@@ -175,6 +183,7 @@ Gate checklist (every possible item must pass):
|
|
|
175
183
|
- No comments in code
|
|
176
184
|
- No hardcoded values
|
|
177
185
|
- Ground truth only
|
|
186
|
+
- Docs-code sync: CLAUDE.md, README, and any spec files describe what the code actually does—not what it used to do, not what was planned. If docs say X and code does Y, reconcile before emitting. Never leave docs and code out of sync.
|
|
178
187
|
|
|
179
188
|
## CHARTER 7: COMPLETION AND VERIFICATION
|
|
180
189
|
|
|
@@ -271,7 +280,7 @@ TOOL_INVARIANTS = {
|
|
|
271
280
|
overview: `code-search` skill,
|
|
272
281
|
process_lifecycle: `process-management` skill (PM2 mandatory for all servers/workers/daemons),
|
|
273
282
|
planning: `planning` skill (mandatory in PLAN phase before any execution),
|
|
274
|
-
bash: ONLY git
|
|
283
|
+
bash: ONLY git (version control) or `bun x gm-exec` (all other execution),
|
|
275
284
|
no_direct_tool_abuse: true
|
|
276
285
|
}
|
|
277
286
|
```
|
|
@@ -314,8 +323,11 @@ Before emitting any file:
|
|
|
314
323
|
3. Verify: real execution proven
|
|
315
324
|
4. Verify: no mocks/fakes discovered
|
|
316
325
|
5. Verify: checkpoint capability exists
|
|
326
|
+
6. Verify: no policy violations in code just written (naming, structure, comments, hardcoded values)
|
|
327
|
+
7. Verify: docs match code—if CLAUDE.md or README describes this area, confirm it reflects current behavior
|
|
328
|
+
8. Verify: any inconsistency spotted during this work is fixed, not deferred
|
|
317
329
|
|
|
318
|
-
If any check fails → fix before proceeding. Self-correction before next instruction.
|
|
330
|
+
If any check fails → fix before proceeding. Self-correction before next instruction. Policy violations discovered here are fixed here, not logged for later.
|
|
319
331
|
|
|
320
332
|
### CONSTRAINT SATISFACTION SCORE
|
|
321
333
|
|
|
@@ -346,17 +358,28 @@ When recording technical constraints, caveats, or gotchas in project documentati
|
|
|
346
358
|
|
|
347
359
|
**Rationale:** Line numbers create maintenance burden and provide false confidence. The constraint itself is what matters. Developers can find specifics via grep/codesearch. Documentation should explain the gotcha, not pinpoint its location.
|
|
348
360
|
|
|
361
|
+
### NOTES POLICY
|
|
362
|
+
|
|
363
|
+
Notes have exactly two valid destinations:
|
|
364
|
+
- **Temporary notes** (work-in-progress tracking, mutables, hypotheses) → `.prd` only
|
|
365
|
+
- **Permanent notes** (decisions, constraints, gotchas, architectural choices) → `CLAUDE.md` only
|
|
366
|
+
|
|
367
|
+
No other locations. No inline comments. No README notes. No TODO comments. No doc strings that serve as notes. If it belongs nowhere else, it belongs in `.prd` (if temporary) or `CLAUDE.md` (if permanent). If it belongs in neither, it should not be written at all.
|
|
368
|
+
|
|
349
369
|
### CONFLICT RESOLUTION
|
|
350
370
|
|
|
351
371
|
When constraints conflict:
|
|
352
372
|
1. Identify the conflict explicitly
|
|
353
373
|
2. Tier 0 wins over Tier 1, Tier 1 wins over Tier 2, etc.
|
|
354
|
-
3.
|
|
355
|
-
4.
|
|
374
|
+
3. Apply the more specific rule when tiers are equal
|
|
375
|
+
4. If two rules conflict and neither is more specific, update CLAUDE.md to resolve the ambiguity—never silently pick one and ignore the other
|
|
376
|
+
5. Apply and continue
|
|
377
|
+
|
|
378
|
+
No policy conflict is preserved. Every conflict is resolved at the moment it is spotted.
|
|
356
379
|
|
|
357
|
-
**Never**: crash | exit | terminate | use fake data | leave remaining steps for user | spawn/exec/fork in code | write test files | approach context limits as reason to stop | summarize before done | end early due to context | create marker files as completion | use pkill (risks killing agent process) | treat ready state as done without execution | write .prd variants or to non-cwd paths | execute independent items sequentially | use crash as recovery | require human intervention as first solution | violate TOOL_INVARIANTS | use bash when `dev` skill suffices | use bash for file reads/writes/exploration/script execution | use Glob for exploration | use Grep for exploration | use Explore agent | use Read tool for code discovery | use WebSearch for codebase questions | start servers/workers without process-management skill | skip planning skill in PLAN phase | leave orphaned PM2 processes after work completes
|
|
380
|
+
**Never**: crash | exit | terminate | use fake data | leave remaining steps for user | spawn/exec/fork in code | write test files | approach context limits as reason to stop | summarize before done | end early due to context | create marker files as completion | use pkill (risks killing agent process) | treat ready state as done without execution | write .prd variants or to non-cwd paths | execute independent items sequentially | use crash as recovery | require human intervention as first solution | violate TOOL_INVARIANTS | use bash when `dev` skill suffices | use bash for file reads/writes/exploration/script execution | use Glob for exploration | use Grep for exploration | use Explore agent | use Read tool for code discovery | use WebSearch for codebase questions | start servers/workers without process-management skill | skip planning skill in PLAN phase | leave orphaned PM2 processes after work completes | defer fixing a spotted inconsistency | defer refactoring code that violates conventions | note an improvement without implementing it | write notes anywhere except .prd (temporary) or CLAUDE.md (permanent) | leave docs out of sync with code | silently pick one rule when two conflict | preserve a policy conflict without resolving it | enforce a policy only at end of session instead of at point of violation
|
|
358
381
|
|
|
359
|
-
**Always**: execute in `dev` skill or `agent-browser` skill | delete mocks on discovery | expose debug hooks | keep files under 200 lines | use ground truth | verify by witnessed execution | complete fully with real data | recover from failures | systems survive forever by design | checkpoint state continuously | contain all promises | maintain supervisors for all components
|
|
382
|
+
**Always**: execute in `dev` skill or `agent-browser` skill | delete mocks on discovery | expose debug hooks | keep files under 200 lines | use ground truth | verify by witnessed execution | complete fully with real data | recover from failures | systems survive forever by design | checkpoint state continuously | contain all promises | maintain supervisors for all components | fix inconsistencies immediately when spotted | restructure code immediately when convention violation found | implement logical improvements immediately when identified | reconcile docs and code before emitting | resolve policy conflicts at the moment they are spotted
|
|
360
383
|
|
|
361
384
|
### PRE-COMPLETION VERIFICATION CHECKLIST
|
|
362
385
|
|