@pmaddire/gcie 0.1.9 → 0.1.11

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/GCIE_USAGE.md CHANGED
@@ -38,8 +38,13 @@ gcie.cmd adaptive-profile . --clear
38
38
  ```
39
39
 
40
40
  Post-init adaptation pipeline:
41
+ - run from the target repo root (cd <repo> first); use . as scope
42
+ - adaptation now bootstraps per-family method defaults before accuracy rounds (plain/plain-gapfill/plain-rescue/slices)
43
+ - adaptation case generation is mixed by design (single-file, same-layer pairs, cross-subtree pairs, and some 3-file chains on larger runs)
41
44
  ```powershell
42
45
  gcie.cmd adapt . --benchmark-size 10 --efficiency-iterations 5 --clear-profile
46
+ # mixed-layer repos: use wider calibration
47
+ gcie.cmd adapt . --benchmark-size 25 --efficiency-iterations 5 --clear-profile
43
48
  ```
44
49
 
45
50
  One-shot setup + adaptation:
@@ -148,7 +153,7 @@ When retrieval is weak, apply in this exact order:
148
153
  1. Query upgrade: add explicit files, symbols, caller/entry anchor
149
154
  2. Scope correction: subtree vs root
150
155
  3. One profile/budget escalation
151
- 4. Targeted gap-fill for only missing must-have file(s)
156
+ 4. Targeted gap-fill for only missing must-have file(s), preferring direct file-path scope first
152
157
  5. Multi-hop decomposition only if still incomplete
153
158
 
154
159
  Stop condition:
@@ -189,6 +194,29 @@ gcie.cmd index .
189
194
  - Proceed to calibration only after coverage is reachable with stable behavior.
190
195
  - If not reachable, keep safer fallback mode for affected families and continue tracking.
191
196
 
197
+ ## Calibration Quality Gate (Cross-Repo, Required)
198
+
199
+ Before accepting adaptation results, verify calibration quality:
200
+
201
+ 1. Family diversity floor:
202
+ - the generated benchmark set should cover at least 3 task families when the repo has multiple top-level subsystems
203
+ - if adaptation output is dominated by only `single_file` and `same_layer_pair`, treat it as underfit
204
+
205
+ 2. Underfit recovery:
206
+ - rerun adaptation with wider calibration
207
+ ```powershell
208
+ gcie.cmd adapt . --benchmark-size 25 --efficiency-iterations 5 --clear-profile
209
+ ```
210
+ - keep `benchmark-size 10` only for small/single-layer repos or quick smoke checks
211
+
212
+ 3. Accuracy-first acceptance:
213
+ - do not accept a profile below `100%` full-hit if a recoverable path exists
214
+ - run one rescue cycle (query upgrade -> scope correction -> one budget/profile rung -> targeted gap-fill)
215
+ - only then finalize family defaults
216
+
217
+ 4. Cost lock sanity:
218
+ - if selected profile is much more expensive than cheapest (`>40%` token delta), keep status as cost-risk and continue family-level refinement
219
+ - do not freeze expensive global defaults unless they are uniquely required for `100%`
192
220
  ## Automatic Post-Trigger Adaptation (Required)
193
221
 
194
222
  After trigger detection in a repo session:
@@ -338,8 +366,37 @@ After running adaptation:
338
366
  Commands:
339
367
  ```powershell
340
368
  gcie.cmd adapt . --benchmark-size 10 --efficiency-iterations 5 --clear-profile
369
+ # mixed-layer repos: use wider calibration
370
+ gcie.cmd adapt . --benchmark-size 25 --efficiency-iterations 5 --clear-profile
341
371
  ```
342
372
  ```powershell
343
373
  gcie.cmd adapt . --benchmark-size 10 --efficiency-iterations 5
344
374
  ```
345
375
 
376
+
377
+ ## Remove GCIE From A Repo
378
+
379
+ To remove GCIE-managed files from the current repo:
380
+
381
+ ```powershell
382
+ gcie.cmd remove .
383
+ ```
384
+
385
+ Options:
386
+ - keep `GCIE_USAGE.md`: `--keep-usage`
387
+ - keep `SETUP_ANY_REPO.md`: `--keep-setup-doc`
388
+ - also remove `.planning` artifacts: `--remove-planning`
389
+
390
+ Example:
391
+
392
+ ```powershell
393
+ gcie.cmd remove . --remove-planning
394
+ ```
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
package/cli/app.py CHANGED
@@ -14,7 +14,7 @@ from .commands.context_slices import adaptive_profile_summary, clear_adaptive_pr
14
14
  from .commands.debug import run_debug
15
15
  from .commands.index import run_index
16
16
  from .commands.query import run_query
17
- from .commands.setup import run_setup
17
+ from .commands.setup import run_remove, run_setup
18
18
 
19
19
  app = typer.Typer(help="GraphCode Intelligence Engine CLI")
20
20
 
@@ -177,6 +177,21 @@ def setup_cmd(
177
177
  typer.echo(json.dumps(result, indent=2))
178
178
 
179
179
 
180
+ @app.command("remove")
181
+ def remove_cmd(
182
+ path: str = typer.Argument("."),
183
+ remove_planning: bool = typer.Option(False, "--remove-planning", help="Also remove .planning artifacts"),
184
+ keep_usage: bool = typer.Option(False, "--keep-usage", help="Keep GCIE_USAGE.md in place"),
185
+ keep_setup_doc: bool = typer.Option(False, "--keep-setup-doc", help="Keep SETUP_ANY_REPO.md in place"),
186
+ ) -> None:
187
+ result = run_remove(
188
+ path,
189
+ remove_planning=remove_planning,
190
+ remove_gcie_usage=not keep_usage,
191
+ remove_setup_doc=not keep_setup_doc,
192
+ )
193
+ typer.echo(json.dumps(result, indent=2))
194
+
180
195
  @app.command("cache-clear")
181
196
  def cache_clear_cmd(path: str = typer.Argument(".")) -> None:
182
197
  result = clear_cache(path)
@@ -197,3 +212,5 @@ def cache_warm_cmd(path: str = typer.Argument(".")) -> None:
197
212
 
198
213
  if __name__ == "__main__":
199
214
  app()
215
+
216
+