Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
8ca314a
feat: map hierarchical tokens to flows
miciav May 19, 2026
d8c645c
feat: add hierarchical auction engine
miciav May 19, 2026
d50dc7f
feat: add hierarchical auction runner
miciav May 19, 2026
070da5b
feat: register hierarchical auction method in run.py
miciav May 19, 2026
e69d1c4
test: add hierarchical auction import smoke test
miciav May 19, 2026
f2e3591
fix: correct service quantum, prevent self-allocation, recompute welf…
miciav May 19, 2026
c5c1f68
fix: compute structure price unconditionally per structure, not per f…
miciav May 19, 2026
dc94d24
fix: extract real latency from graph; latency_weight now effective in…
miciav May 19, 2026
90d3f27
fix: assert global feasibility invariant after each run_higher_levels…
miciav May 19, 2026
0d06285
refactor: remove dead omega assignment and bid_price field; expand pu…
miciav May 19, 2026
8e1fb00
test: add engine early-termination and multi-level cascade tests
miciav May 19, 2026
58138ac
docs: add post-review fixes plan and update GitNexus index metadata
miciav May 19, 2026
b961d7a
refactor: simplify engine/runner — remove narrating comments, vectori…
miciav May 19, 2026
584c46a
test: add 88 new tests across models, data generation, auction, and C…
miciav May 19, 2026
a20cec7
fix hierarchical auction edge cases
miciav May 20, 2026
8e5154e
add gurobi planar e2e test
miciav May 20, 2026
3985554
fix: Update benchmark and test files
miciav May 20, 2026
2dc9c74
fix: Update benchmark and test files
miciav May 20, 2026
c0e96ac
Merge remote-tracking branch 'origin/main' into feat/uv-migration-and…
miciav May 20, 2026
fdd8553
docs: add planar hierarchical campaign config and README section
miciav May 20, 2026
8cc040c
fix: resolve runtime errors in hierarchical planar campaign
miciav May 20, 2026
84a2f1d
fix: save runtime.csv in hierarchical runner and handle its TC format
miciav May 20, 2026
34f1ec4
docs: rename planar config and extend to three-way comparison
miciav May 20, 2026
a6646b8
fix: save runtime.csv in faasmacro runner to avoid fragile log parsing
miciav May 20, 2026
e8b7189
fix experiment orchestration regressions
miciav Jun 25, 2026
746a29f
docs: add FaaS-MADiG distributed-heuristic design spec and alternatives
miciav Jun 25, 2026
db53e8e
docs: add FaaS-MADiG implementation plan
miciav Jun 25, 2026
f59a63c
feat(madig): add price-free define_assignments helper
miciav Jun 25, 2026
32fff7b
feat(madig): add price-free evaluate_assignments helper
miciav Jun 25, 2026
1ceae52
feat(madig): add price-free run() runner with runtime.csv
miciav Jun 25, 2026
4329892
feat(madig): wire faas-diffuse method into run.py orchestrator
miciav Jun 25, 2026
a16ece3
feat(madig): add diffusion config block and compare_results palette
miciav Jun 25, 2026
b75dfd5
fix(madig): guard set_solution_folder for new method key; add run() r…
miciav Jun 25, 2026
bea6a94
docs: add FaaS-MADiG paper-ready LaTeX technical note
miciav Jun 25, 2026
246cc2a
docs: FaaS-MADiG note — literature positioning + verified citations
miciav Jun 26, 2026
6534f48
align faas-madig with madea
miciav Jun 26, 2026
960fbcd
docs: add FaaS-MAPoD power-of-d design spec (+ LaTeX note plan)
miciav Jun 26, 2026
1bee8fb
docs: refine FaaS-MAPoD spec after review
miciav Jun 26, 2026
c7b56ff
docs: add FaaS-MAPoD implementation plan
miciav Jun 26, 2026
1fccd85
feat: add sample_assignments power-of-d buyer rule (FaaS-MAPoD)
miciav Jun 26, 2026
eb7aa10
fix: preserve float capacity parity in sample_assignments; tidy lambd…
miciav Jun 26, 2026
3d90205
feat: add FaaS-MAPoD run() reusing diffusion seller clearing
miciav Jun 26, 2026
7eae759
feat: wire FaaS-MAPoD into run.py, compare_results, planar config
miciav Jun 26, 2026
ba3416a
test: add FaaS-MAPoD e2e smoke and reproducibility (Gurobi-gated)
miciav Jun 26, 2026
393850a
docs: add FaaS-MAPoD LaTeX note (power-of-d positioning)
miciav Jun 26, 2026
21f939e
fix: memory-bid parity with FaaS-MADiG + test/doc hardening (review)
miciav Jun 26, 2026
07ff7b5
docs: audit FaaS-MAPoD note citations + tighten power-of-d positioning
miciav Jun 26, 2026
61cada5
docs: add the 3 remaining cited PDFs (user-provided) + refine capacit…
miciav Jun 26, 2026
fd0b031
feat: harden FaaS-MAPoD inputs + deterministic candidate sampling
miciav Jun 26, 2026
09fcf5e
docs: add FaaS-MABR distributed best-response (Gauss-Seidel) design spec
miciav Jun 26, 2026
5652d9e
docs: refine FaaS-MABR spec after review
miciav Jun 26, 2026
4f1db98
feat: add LSP_capped / LSP_capped_fixedr offloading-cap models
miciav Jun 26, 2026
959a85e
feat: add sequential best-response sweep (FaaS-MABR core)
miciav Jun 26, 2026
a137f9c
feat: add reoptimize_node capped per-node solve (FaaS-MABR-O)
miciav Jun 26, 2026
1859d2f
feat: add FaaS-MABR _run loop and run_br_s/r/o entry points
miciav Jun 27, 2026
a4cefe6
feat: wire FaaS-MABR-S/R/O into run.py, compare_results, planar config
miciav Jun 27, 2026
57e7ecd
test: add FaaS-MABR e2e smoke + reproducibility (Gurobi-gated)
miciav Jun 27, 2026
db5952f
docs: add FaaS-MABR LaTeX note (Gauss-Seidel positioning)
miciav Jun 27, 2026
5159f89
test: add block-A memory-bid unit test and BR-R reproducibility e2e test
miciav Jun 27, 2026
f6218c9
refactor: simplify FaaS-MABR sweep + drop committed SDD scratch
miciav Jun 27, 2026
fb499eb
feat: FaaS-MABR best-response heuristics + cross-method coordination …
miciav Jun 27, 2026
88170d0
docs: add remote_experiments design spec
miciav Jun 30, 2026
32a7fbc
docs: amend remote_experiments spec for the running_hosts() dependency
miciav Jun 30, 2026
7a88d2e
docs: add remote_experiments implementation plan
miciav Jun 30, 2026
9e24581
build: add ray-dispatcher and rich for remote_experiments
miciav Jun 30, 2026
eeac9d5
feat: expose faas-macro v0 variant via --v0 CLI flag
miciav Jun 30, 2026
7a60ed7
feat: add Experiment/Batch value objects for remote_experiments
miciav Jun 30, 2026
b772ede
feat: add experiment suite registry
miciav Jun 30, 2026
5318bf8
feat: add smoke suite covering all 10 algorithms
miciav Jun 30, 2026
65845e7
feat: map Experiment to ray_dispatcher.Job
miciav Jun 30, 2026
9e8ab14
feat: add Manifest for persisted per-experiment status
miciav Jun 30, 2026
63a228a
feat: add selection parsing and resume defaults
miciav Jun 30, 2026
6930fe5
feat: add batch/VM progress stats and ETA heuristic
miciav Jun 30, 2026
f699688
feat: add submit/poll loop with stop-on-interrupt
miciav Jun 30, 2026
7de8480
feat: add rich TUI rendering for batch/VM/experiment progress
miciav Jun 30, 2026
1ba0fcc
feat: add define/run CLI for remote_experiments
miciav Jun 30, 2026
4bb514f
docs: add remote_experiments usage README and example inventory
miciav Jun 30, 2026
1c27714
test: cover cmd_run wiring; docs: add remote_experiments README prere…
miciav Jun 30, 2026
b199ef9
document centralized feasibility contract
miciav Jun 30, 2026
b5eea4b
plan centralized feasibility enforcement
miciav Jun 30, 2026
2e78b4b
add centralized feasibility validator
miciav Jun 30, 2026
04f9068
cover distinct non-neighbor offload
miciav Jun 30, 2026
15c5c01
harden centralized feasibility validation
miciav Jun 30, 2026
d996673
fix centralized validator edge cases
miciav Jun 30, 2026
545f3da
fix malformed validator diagnostics
miciav Jun 30, 2026
9ca332c
enforce centralized feasibility for heuristic solutions
miciav Jun 30, 2026
4791f6f
keep outputs centrally feasible
miciav Jun 30, 2026
5f84d8f
fix centralized feasibility regressions
miciav Jun 30, 2026
b5dab29
fix: tighten hierarchical replicas to centralized equilibrium
miciav Jun 30, 2026
fc2427c
fix rejection handling and add regression instances
miciav Jun 30, 2026
ca5b97d
document remote experiments fixes
miciav Jul 1, 2026
ef46f2e
fix remote experiment execution
miciav Jul 1, 2026
ce22917
plan hierarchical model experiments
miciav Jul 1, 2026
72fb5a0
design paper experiment generators
miciav Jul 1, 2026
3406412
add paper experiment generators
miciav Jul 1, 2026
9dc03fa
design FaaS-MALD dual coordination
miciav Jul 2, 2026
e92a5e3
spec: add LaTeX note deliverable and Sonnet-5 execution policy
miciav Jul 2, 2026
9acee0b
add materialized paper experiment instances
miciav Jul 2, 2026
1074ca7
preserve combined solution snapshots
miciav Jul 2, 2026
4bb18a4
hierarchical madea runner added
miciav Jul 2, 2026
e4137ed
added hierarchical madea runner
miciav Jul 2, 2026
b273a59
spec: clarify model policy (Sonnet 5 cap, Haiku allowed)
miciav Jul 2, 2026
c19944a
plan FaaS-MALD implementation
miciav Jul 2, 2026
fe56c83
add FaaS-MALD buyer-side dual helpers
miciav Jul 2, 2026
17e6d44
add FaaS-MALD dual subgradient round with gap certificate
miciav Jul 2, 2026
7e7b69d
add FaaS-MALD runner and e2e tests
miciav Jul 2, 2026
e009c8f
add FaaS-MALD technical note
miciav Jul 2, 2026
b4d1848
design FaaS-MALD findings remediation
miciav Jul 2, 2026
9326b5b
plan FaaS-MALD findings remediation
miciav Jul 2, 2026
b8a37ef
remediate FaaS-MALD dual coordination
miciav Jul 2, 2026
8c72aa7
align FaaS-MALD note with remediated algorithm
miciav Jul 2, 2026
dddaea8
use sparse neighbour traversal in pair_scores
miciav Jul 2, 2026
5528954
compress option-validation pseudocode to fix overfull page
miciav Jul 2, 2026
e5335e0
exit dual round early when no bid is placeable
miciav Jul 2, 2026
34f23c5
certify zero optimum when no bid is placeable
miciav Jul 2, 2026
eb08755
add FaaS-MALD smoke config
miciav Jul 2, 2026
6b63e98
add FaaS-MAPG potential-game design spec
miciav Jul 2, 2026
08966c6
add FaaS-MAPG implementation plan
miciav Jul 2, 2026
66f1a5d
add LSP_pg models for FaaS-MAPG node proposals
miciav Jul 2, 2026
67ff0d9
add FaaS-MAPG utility and split helpers
miciav Jul 2, 2026
2e21574
add FaaS-MAPG better-response move and sweep
miciav Jul 2, 2026
32b960f
add FaaS-MAPG outer loop, runners and CLI
miciav Jul 3, 2026
667cb88
add FaaS-MAPG end-to-end test
miciav Jul 3, 2026
b13e460
register FaaS-MAPG variants in run.py and configs
miciav Jul 3, 2026
6e0096d
add FaaS-MAPG technical note
miciav Jul 3, 2026
ff210b2
fix MAPG termination string to match run.py postprocessing parser
miciav Jul 3, 2026
d7b070b
enforce FRALB no-ping-pong in MAPG moves
miciav Jul 3, 2026
1c47c0a
fix MAPG memory-market scarcity signal and stale rho
miciav Jul 3, 2026
3deee80
update
miciav Jul 3, 2026
b50a584
Add design spec for FaaS-MAGCAA decentralized algorithm
miciav Jul 3, 2026
4ac1243
Correct FaaS-MAGCAA spec: reuse run_faasmadea.define_bids directly
miciav Jul 3, 2026
ad1eeb1
Add implementation plan for FaaS-MAGCAA
miciav Jul 3, 2026
558f223
Add GCAA consensus function (resolve_gcaa_round)
miciav Jul 3, 2026
6ac5de7
Add FaaS-MAGCAA run() orchestration
miciav Jul 3, 2026
5b636d5
Register FaaS-MAGCAA in run.py
miciav Jul 3, 2026
be02a00
Add FaaS-MAGCAA config sections and end-to-end test
miciav Jul 3, 2026
576228d
Skip GCAA end-to-end test without Gurobi license
miciav Jul 3, 2026
467391f
Revert "Skip GCAA end-to-end test without Gurobi license"
miciav Jul 3, 2026
163a0cd
Fix FaaS-MAGCAA allocation edge cases
miciav Jul 3, 2026
6671858
Handle first GCAA centralized candidate
miciav Jul 3, 2026
4cf7335
prevent ping-pong in GCAA rounds
miciav Jul 3, 2026
8f31171
design FaaS-MAGCAA technical note
miciav Jul 3, 2026
52a7ed1
plan FaaS-MAGCAA technical note
miciav Jul 3, 2026
a76b36e
scaffold FaaS-MAGCAA technical note
miciav Jul 4, 2026
22a1044
document FaaS-MAGCAA algorithm
miciav Jul 4, 2026
f194ccd
correct FaaS-MAGCAA note semantics
miciav Jul 4, 2026
22ef0e3
polish FaaS-MAGCAA note
miciav Jul 4, 2026
3a26d8a
preserve FaaS-MAGCAA algorithm order
miciav Jul 4, 2026
86305c9
complete FaaS-MAGCAA note guidance
miciav Jul 4, 2026
b668f6b
document exact MAGCAA artifacts
miciav Jul 4, 2026
dcd527b
finalize MAGCAA note artifacts
miciav Jul 4, 2026
e8c19c7
clarify MAGCAA generated artifacts
miciav Jul 4, 2026
997a373
add plasma core types and options
miciav Jul 4, 2026
037c9c6
add plasma round-barrier scheduler
miciav Jul 4, 2026
170c019
add plasma layer A routing primitives
miciav Jul 4, 2026
6bea576
add plasma heartbeat protocol and staleness cache
miciav Jul 4, 2026
5467507
add plasma layer B dSB solver with hamiltonian and repair
miciav Jul 4, 2026
f9bb987
add PlasmaNode layer A window behavior
miciav Jul 4, 2026
4f198df
add PlasmaNode layer B pass with hysteresis and randomized commit
miciav Jul 4, 2026
ddea7a6
add plasma engine with round barrier, forwarding and heartbeats
miciav Jul 4, 2026
0f88ac6
add plasma runner writing LSPc results and argparse cli
miciav Jul 4, 2026
39ea690
register plasma method in run.py dispatch
miciav Jul 4, 2026
025d2cf
validate plasma options at construction
miciav Jul 4, 2026
456186c
scale plasma arrivals by round period W
miciav Jul 4, 2026
4180a2a
normalize plasma utilization by round period W
miciav Jul 4, 2026
35b0552
strengthen W!=1 test to catch unscaled arrivals
miciav Jul 4, 2026
3f79946
advertise floored spare capacity in heartbeats
miciav Jul 4, 2026
ee6817e
guard plasma objective against zero-load pairs
miciav Jul 4, 2026
f0573fc
drop dead heartbeat alpha accessor and stale comment
miciav Jul 4, 2026
219a24c
validate heartbeat latency against staleness window
miciav Jul 4, 2026
6dedc0c
add plasma baselines: milp snapshot, routing lp, greedy, madea iface
miciav Jul 4, 2026
55f4739
add plasma regret and adaptation-lag metrics
miciav Jul 4, 2026
b250fea
add plasma acceptance tests: lp convergence and milp gap
miciav Jul 4, 2026
89eed19
scaffold faas-plasma-note LaTeX package
miciav Jul 4, 2026
fd34c83
fix stale-oracle shedding and align milp gap test windows
miciav Jul 4, 2026
91e0644
route local-first, physarum on overflow only
miciav Jul 5, 2026
872e007
solve layer B exactly via knapsack DP, keep dSB as ablation
miciav Jul 5, 2026
1b0956a
vectorize window routing with bulk forward resolution
miciav Jul 5, 2026
7710c27
count offload pressure once per overflow request
miciav Jul 5, 2026
818b32e
scale knapsack DP by ram gcd
miciav Jul 5, 2026
67ee91e
reward served demand, not replica count, in layer B field
miciav Jul 5, 2026
5097dbf
make throughput-placement test discriminate old field
miciav Jul 5, 2026
ae05011
add plasma design and plan documents
miciav Jul 5, 2026
5326692
provision replicas for arrivals, not accepted traffic
miciav Jul 5, 2026
17daa7f
add M6 failure scenario driver with oracle and baselines
miciav Jul 5, 2026
8bff5a8
add plasma sweep driver and M7 rare-function config
miciav Jul 5, 2026
e2640bf
use min/max Nn in m7 config for direct runner use
miciav Jul 5, 2026
edc9f75
admit by reward: forward when beta beats alpha
miciav Jul 5, 2026
fc2c801
advertise fair-share spare to prevent oversubscription
miciav Jul 6, 2026
ec90be7
Revert "advertise fair-share spare to prevent oversubscription"
miciav Jul 6, 2026
73f8fda
feat: add TightLoadManagementModel, a faster equivalent centralized m…
miciav Jul 6, 2026
b3f4990
switch all configs to gurobi_direct (8x: skips per-solve license check)
miciav Jul 6, 2026
10a0776
cache solver per process: SolverFactory rebuilt the gurobi env every …
miciav Jul 6, 2026
4c0b2a4
default planar benchmark to gurobi_direct
miciav Jul 6, 2026
33d1212
register pg/gcaa/plasma for remote execution
miciav Jul 6, 2026
02da05c
use integers
FFede0 Jul 6, 2026
58097aa
avoid errors when one method run
FFede0 Jul 6, 2026
d78732a
more informative error message
FFede0 Jul 6, 2026
ac2a94e
improved logging
FFede0 Jul 6, 2026
64e9db2
temporary fix to avoid changin x in SPr
FFede0 Jul 6, 2026
1677211
improved logging & fix x in SPr
FFede0 Jul 6, 2026
06b7e63
Merge branch 'temp_to_merge' into feat/uv-migration-and-extended-tests
FFede0 Jul 6, 2026
9170dc6
propagate sp_x to all social-welfare callers; align tests with intege…
miciav Jul 6, 2026
d2b115a
docs: spec for two-phase auto-chained experimental campaign
miciav Jul 6, 2026
e7c9857
fix eta schedule support and n_auctions=0 crash in evaluate_bids
miciav Jul 7, 2026
af547c4
corrected error
FFede0 Jul 7, 2026
23847a1
enforce no_ping_pong across all decentralized methods
miciav Jul 7, 2026
72f06ba
drop inert sp_x/x_bar propagation from LSPr-based social-welfare callers
miciav Jul 7, 2026
298d469
fix over-subtraction in run_faasmadea.evaluate_bids swap branch
miciav Jul 7, 2026
1b3786e
docs: hierarchical-madea plans, campaign spec and plasma note updates
miciav Jul 7, 2026
4483af3
add solved test instance fixture 2026-06-30_13-54-13
miciav Jul 7, 2026
952b8cc
resolve centralized model name from disk in postprocessing (tight var…
miciav Jul 7, 2026
fe6955b
harden merge_sol_dict against methods with mismatched timestep ranges
miciav Jul 7, 2026
915d7c6
docs: screening at n{50,100} with relative-to-best metric
miciav Jul 7, 2026
f8992f1
docs: implementation plan for two-phase auto-chained campaign
miciav Jul 7, 2026
bdc86b0
feat(remote): --yes runs all pending non-interactively
miciav Jul 7, 2026
77297b6
feat(paper): survivors plumbing, anchors, tunable filter, 5 seeds
miciav Jul 7, 2026
e384a1a
feat(paper): paper-a-screening suite (260 runs, relative-to-best)
miciav Jul 7, 2026
0eabcc5
fix infinite loop in powerd sample_assignments with fractional omega
miciav Jul 7, 2026
919e87d
feat(paper): confirmatory suites on survivors+anchors, e2 n=500, e6 n=50
miciav Jul 7, 2026
b1cde05
add standalone benchmark gap+runtime extractor
miciav Jul 7, 2026
ca2fbbf
feat(remote): results_reader for per-run objective/runtime
miciav Jul 7, 2026
a98a128
chore: drop unrequested benchmark_summary.py (scope creep, duplicates…
miciav Jul 7, 2026
cb18ff1
feat(remote): relative-to-best survivor selection with guard
miciav Jul 7, 2026
426555a
feat(remote): campaign orchestrator with resumable screen/select/confirm
miciav Jul 7, 2026
d8b8564
docs(remote): document one-command two-phase campaign
miciav Jul 7, 2026
480946d
normalize centralized runtime column name in postprocessing (tight va…
miciav Jul 8, 2026
eb462f8
fix campaign batch_id determinism and interrupt handling
miciav Jul 8, 2026
8e245e0
Revert "chore: drop unrequested benchmark_summary.py"
miciav Jul 8, 2026
d6092b7
skip folders that do not obey parse format
FFede0 May 20, 2026
38724c2
write all logs (not sure if it works with both methods though)
FFede0 May 20, 2026
9654478
skip folders that do not obey parse format
FFede0 Jun 4, 2026
ca31665
avoid issues in box plotting
FFede0 Jun 4, 2026
65b124e
avoid issues when postprocessing subfolder does not exist
FFede0 Jul 9, 2026
fc501bb
avoid error
FFede0 Jul 9, 2026
1472634
sheer madness
FFede0 Jul 9, 2026
030b6b7
measuring time as in madea
FFede0 Jul 9, 2026
606825e
removed wrong explanation
FFede0 Jul 9, 2026
9ee5d52
minor changes (for convenience)
FFede0 Jul 9, 2026
d6e018b
try to improve bids eval
FFede0 Jul 9, 2026
a7a246a
delete not-to-be-inherited constraint
FFede0 Jul 9, 2026
1cb6afa
fixed error
FFede0 Jul 9, 2026
56704f2
removed useless copy
FFede0 Jul 9, 2026
e27ecb9
hopefully corrected error
FFede0 Jul 9, 2026
806af0b
solved issues with infinite loop and wrong sending/receiving update
FFede0 Jul 10, 2026
faa50cf
fixed error
FFede0 Jul 10, 2026
515fdf8
wrong line
FFede0 Jul 10, 2026
384722b
fixed incorrect function call
FFede0 Jul 12, 2026
d79a6ec
compare against given baseline
FFede0 Jul 13, 2026
3d34399
more coherent report
FFede0 Jul 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
82 changes: 82 additions & 0 deletions .agents/skills/gitnexus/gitnexus-cli/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: gitnexus-cli
description: "Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos. Examples: \"Index this repo\", \"Reanalyze the codebase\", \"Generate a wiki\""
---

# GitNexus CLI Commands

All commands work via `npx` — no global install required.

## Commands

### analyze — Build or refresh the index

```bash
npx gitnexus analyze
```

Run from the project root. This parses all source files, builds the knowledge graph, writes it to `.gitnexus/`, and generates AGENTS.md / AGENTS.md context files.

| Flag | Effect |
| -------------- | ---------------------------------------------------------------- |
| `--force` | Force full re-index even if up to date |
| `--embeddings` | Enable embedding generation for semantic search (off by default) |

**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Codex, a PostToolUse hook runs `analyze` automatically after `git commit` and `git merge`, preserving embeddings if previously generated.

### status — Check index freshness

```bash
npx gitnexus status
```

Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed.

### clean — Delete the index

```bash
npx gitnexus clean
```

Deletes the `.gitnexus/` directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project.

| Flag | Effect |
| --------- | ------------------------------------------------- |
| `--force` | Skip confirmation prompt |
| `--all` | Clean all indexed repos, not just the current one |

### wiki — Generate documentation from the graph

```bash
npx gitnexus wiki
```

Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use).

| Flag | Effect |
| ------------------- | ----------------------------------------- |
| `--force` | Force full regeneration |
| `--model <model>` | LLM model (default: minimax/minimax-m2.5) |
| `--base-url <url>` | LLM API base URL |
| `--api-key <key>` | LLM API key |
| `--concurrency <n>` | Parallel LLM calls (default: 3) |
| `--gist` | Publish wiki as a public GitHub Gist |

### list — Show all indexed repos

```bash
npx gitnexus list
```

Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information.

## After Indexing

1. **Read `gitnexus://repo/{name}/context`** to verify the index loaded
2. Use the other GitNexus skills (`exploring`, `debugging`, `impact-analysis`, `refactoring`) for your task

## Troubleshooting

- **"Not inside a git repository"**: Run from a directory inside a git repo
- **Index is stale after re-analyzing**: Restart Codex to reload the MCP server
- **Embeddings slow**: Omit `--embeddings` (it's off by default) or set `OPENAI_API_KEY` for faster API-based embedding
89 changes: 89 additions & 0 deletions .agents/skills/gitnexus/gitnexus-debugging/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
name: gitnexus-debugging
description: "Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\""
---

# Debugging with GitNexus

## When to Use

- "Why is this function failing?"
- "Trace where this error comes from"
- "Who calls this method?"
- "This endpoint returns 500"
- Investigating bugs, errors, or unexpected behavior

## Workflow

```
1. gitnexus_query({query: "<error or symptom>"}) → Find related execution flows
2. gitnexus_context({name: "<suspect>"}) → See callers/callees/processes
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed
```

> If "Index is stale" → run `npx gitnexus analyze` in terminal.
## Checklist

```
- [ ] Understand the symptom (error message, unexpected behavior)
- [ ] gitnexus_query for error text or related code
- [ ] Identify the suspect function from returned processes
- [ ] gitnexus_context to see callers and callees
- [ ] Trace execution flow via process resource if applicable
- [ ] gitnexus_cypher for custom call chain traces if needed
- [ ] Read source files to confirm root cause
```

## Debugging Patterns

| Symptom | GitNexus Approach |
| -------------------- | ---------------------------------------------------------- |
| Error message | `gitnexus_query` for error text → `context` on throw sites |
| Wrong return value | `context` on the function → trace callees for data flow |
| Intermittent failure | `context` → look for external calls, async deps |
| Performance issue | `context` → find symbols with many callers (hot paths) |
| Recent regression | `detect_changes` to see what your changes affect |

## Tools

**gitnexus_query** — find code related to error:

```
gitnexus_query({query: "payment validation error"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError, PaymentException
```

**gitnexus_context** — full context for a suspect:

```
gitnexus_context({name: "validatePayment"})
→ Incoming calls: processCheckout, webhookHandler
→ Outgoing calls: verifyCard, fetchRates (external API!)
→ Processes: CheckoutFlow (step 3/7)
```

**gitnexus_cypher** — custom call chain traces:

```cypher
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
RETURN [n IN nodes(path) | n.name] AS chain
```

## Example: "Payment endpoint returns 500 intermittently"

```
1. gitnexus_query({query: "payment error handling"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError
2. gitnexus_context({name: "validatePayment"})
→ Outgoing calls: verifyCard, fetchRates (external API!)
3. READ gitnexus://repo/my-app/process/CheckoutFlow
→ Step 3: validatePayment → calls fetchRates (external)
4. Root cause: fetchRates calls external API without proper timeout
```
78 changes: 78 additions & 0 deletions .agents/skills/gitnexus/gitnexus-exploring/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
name: gitnexus-exploring
description: "Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How does X work?\", \"What calls this function?\", \"Show me the auth flow\""
---

# Exploring Codebases with GitNexus

## When to Use

- "How does authentication work?"
- "What's the project structure?"
- "Show me the main components"
- "Where is the database logic?"
- Understanding code you haven't seen before

## Workflow

```
1. READ gitnexus://repos → Discover indexed repos
2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
3. gitnexus_query({query: "<what you want to understand>"}) → Find related execution flows
4. gitnexus_context({name: "<symbol>"}) → Deep dive on specific symbol
5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow
```

> If step 2 says "Index is stale" → run `npx gitnexus analyze` in terminal.

## Checklist

```
- [ ] READ gitnexus://repo/{name}/context
- [ ] gitnexus_query for the concept you want to understand
- [ ] Review returned processes (execution flows)
- [ ] gitnexus_context on key symbols for callers/callees
- [ ] READ process resource for full execution traces
- [ ] Read source files for implementation details
```

## Resources

| Resource | What you get |
| --------------------------------------- | ------------------------------------------------------- |
| `gitnexus://repo/{name}/context` | Stats, staleness warning (~150 tokens) |
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores (~300 tokens) |
| `gitnexus://repo/{name}/cluster/{name}` | Area members with file paths (~500 tokens) |
| `gitnexus://repo/{name}/process/{name}` | Step-by-step execution trace (~200 tokens) |

## Tools

**gitnexus_query** — find execution flows related to a concept:

```
gitnexus_query({query: "payment processing"})
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
→ Symbols grouped by flow with file locations
```

**gitnexus_context** — 360-degree view of a symbol:

```
gitnexus_context({name: "validateUser"})
→ Incoming calls: loginHandler, apiMiddleware
→ Outgoing calls: checkToken, getUserById
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
```

## Example: "How does payment processing work?"

```
1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
2. gitnexus_query({query: "payment processing"})
→ CheckoutFlow: processPayment → validateCard → chargeStripe
→ RefundFlow: initiateRefund → calculateRefund → processRefund
3. gitnexus_context({name: "processPayment"})
→ Incoming: checkoutHandler, webhookHandler
→ Outgoing: validateCard, chargeStripe, saveTransaction
4. Read src/payments/processor.ts for implementation details
```
64 changes: 64 additions & 0 deletions .agents/skills/gitnexus/gitnexus-guide/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: gitnexus-guide
description: "Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: \"What GitNexus tools are available?\", \"How do I use GitNexus?\""
---

# GitNexus Guide

Quick reference for all GitNexus MCP tools, resources, and the knowledge graph schema.

## Always Start Here

For any task involving code understanding, debugging, impact analysis, or refactoring:

1. **Read `gitnexus://repo/{name}/context`** — codebase overview + check index freshness
2. **Match your task to a skill below** and **read that skill file**
3. **Follow the skill's workflow and checklist**

> If step 1 warns the index is stale, run `npx gitnexus analyze` in the terminal first.

## Skills

| Task | Skill to read |
| -------------------------------------------- | ------------------- |
| Understand architecture / "How does X work?" | `gitnexus-exploring` |
| Blast radius / "What breaks if I change X?" | `gitnexus-impact-analysis` |
| Trace bugs / "Why is X failing?" | `gitnexus-debugging` |
| Rename / extract / split / refactor | `gitnexus-refactoring` |
| Tools, resources, schema reference | `gitnexus-guide` (this file) |
| Index, status, clean, wiki CLI commands | `gitnexus-cli` |

## Tools Reference

| Tool | What it gives you |
| ---------------- | ------------------------------------------------------------------------ |
| `query` | Process-grouped code intelligence — execution flows related to a concept |
| `context` | 360-degree symbol view — categorized refs, processes it participates in |
| `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence |
| `detect_changes` | Git-diff impact — what do your current changes affect |
| `rename` | Multi-file coordinated rename with confidence-tagged edits |
| `cypher` | Raw graph queries (read `gitnexus://repo/{name}/schema` first) |
| `list_repos` | Discover indexed repos |

## Resources Reference

Lightweight reads (~100-500 tokens) for navigation:

| Resource | Content |
| ---------------------------------------------- | ----------------------------------------- |
| `gitnexus://repo/{name}/context` | Stats, staleness check |
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores |
| `gitnexus://repo/{name}/cluster/{clusterName}` | Area members |
| `gitnexus://repo/{name}/processes` | All execution flows |
| `gitnexus://repo/{name}/process/{processName}` | Step-by-step trace |
| `gitnexus://repo/{name}/schema` | Graph schema for Cypher |

## Graph Schema

**Nodes:** File, Function, Class, Interface, Method, Community, Process
**Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS

```cypher
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
RETURN caller.name, caller.filePath
```
Loading