ultimate-pi 0.2.3 → 0.2.4
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/.codex/hooks.json +15 -0
- package/.pi/extensions/custom-header.ts +26 -2
- package/.pi/extensions/lib/harness-paths.ts +47 -0
- package/.pi/extensions/model-router-bootstrap.ts +174 -0
- package/.pi/extensions/sentrux-rules-sync.ts +33 -2
- package/.pi/harness/browser.json +1 -0
- package/.pi/model-router.example.json +27 -0
- package/.pi/prompts/graphify.md +4 -8
- package/.pi/prompts/harness-setup.md +143 -92
- package/.pi/settings.json +0 -2
- package/.sentrux/.harness-rules-meta.json +1 -1
- package/AGENTS.md +12 -0
- package/CHANGELOG.md +13 -0
- package/README.md +39 -350
- package/package.json +4 -2
- package/scripts/harness-cli-verify.sh +294 -0
- package/scripts/harness-graphify-bootstrap.sh +151 -0
- package/.pi/model-router.json +0 -95
|
@@ -32,70 +32,52 @@ Block if node < 18, npm < 9, or git missing. Report versions and continue.
|
|
|
32
32
|
|
|
33
33
|
Read `.pi/auto-commit.json` for co-author + branch config. Read `.pi/settings.json` for extension packages list.
|
|
34
34
|
|
|
35
|
-
## Step 0.5 — Graphify
|
|
35
|
+
## Step 0.5 — Graphify (skip if `--skip-graphify`)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
**Critical:** `graphify . --wiki` and `graphify . --update` are **invalid** CLI (error: `unknown command '.'`). Use only:
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
| Goal | Command |
|
|
40
|
+
|------|---------|
|
|
41
|
+
| Initial / refresh code graph (required, no LLM) | `GRAPHIFY_VIZ_NODE_LIMIT=200000 graphify update .` |
|
|
42
|
+
| Full semantic graph (optional, needs API key) | `graphify extract .` |
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
if pip show graphifyy &>/dev/null; then
|
|
45
|
-
echo "✓ Graphify installed"
|
|
46
|
-
GRAPHIFY_INSTALLED=true
|
|
47
|
-
else
|
|
48
|
-
echo "! Graphify not installed"
|
|
49
|
-
GRAPHIFY_INSTALLED=false
|
|
50
|
-
fi
|
|
44
|
+
On first `/harness-setup` in any project (including external repos), you **must** produce a valid `graphify-out/` with non-empty `graph.json` and `GRAPH_REPORT.md`. Do not ask the user whether to build — run the bootstrap script and **block** if it fails.
|
|
51
45
|
|
|
52
|
-
|
|
53
|
-
test -f graphify-out/graph.json && GRAPH_EXISTS=true || GRAPH_EXISTS=false
|
|
54
|
-
```
|
|
46
|
+
Run from the **project root** (the external repo root, not ultimate-pi unless that is the target):
|
|
55
47
|
|
|
56
|
-
|
|
48
|
+
```bash
|
|
49
|
+
mkdir -p ./raw .pi/harness/specs .pi/harness/runs .pi/harness/incidents .pi/harness/debates
|
|
57
50
|
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
# Bundled with ultimate-pi harness; copy path if bootstrap runs from a linked harness checkout
|
|
52
|
+
bash scripts/harness-graphify-bootstrap.sh
|
|
53
|
+
# In ultimate-pi checkout: npm run harness:graphify-bootstrap
|
|
54
|
+
# Or, if scripts/ is not present in the target repo, copy/run ultimate-pi/scripts/harness-graphify-bootstrap.sh
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
# Pass --force when $ARGUMENTS contains --force to rebuild an existing graph:
|
|
57
|
+
# bash scripts/harness-graphify-bootstrap.sh --force
|
|
58
|
+
```
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
> "Graphify not found. Install: `pip install graphifyy && graphify install`. Install now?"
|
|
60
|
+
If `scripts/harness-graphify-bootstrap.sh` is missing in the target repo, run it from the ultimate-pi harness package path, or execute equivalent steps manually:
|
|
66
61
|
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
1. Install `graphifyy` (`uv tool install` preferred; else `pip`/`pip3 install --user`)
|
|
63
|
+
2. `graphify install --platform pi` (and `graphify cursor install` if `.cursor/` exists)
|
|
64
|
+
3. `GRAPHIFY_VIZ_NODE_LIMIT=200000 graphify update .` — **required**; exits non-zero on failure
|
|
65
|
+
4. If `GEMINI_API_KEY`, `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `MOONSHOT_API_KEY` is set: `graphify extract .` for full semantic graph (optional enrichment)
|
|
66
|
+
5. `graphify hook install` only when `.git/` exists
|
|
67
|
+
6. Validate: `graphify-out/graph.json` has ≥1 node and `graphify-out/GRAPH_REPORT.md` exists
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
**Do not continue** to Step 2+ until validation passes. Report node/edge counts from the script output.
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
# Install if needed
|
|
74
|
-
if [ "$GRAPHIFY_INSTALLED" != "true" ]; then
|
|
75
|
-
pip install graphifyy && graphify install
|
|
76
|
-
fi
|
|
71
|
+
Read and summarize `graphify-out/GRAPH_REPORT.md` — god nodes and surprising connections.
|
|
77
72
|
|
|
78
|
-
|
|
79
|
-
if [ "$GRAPH_EXISTS" = "true" ]; then
|
|
80
|
-
graphify . --update --wiki
|
|
81
|
-
else
|
|
82
|
-
graphify . --wiki
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# Install git hooks — auto-update graph on commit/checkout
|
|
86
|
-
graphify hook install
|
|
73
|
+
### Failure modes (report clearly)
|
|
87
74
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Create project directories needed for graphify + harness workflow:
|
|
96
|
-
```bash
|
|
97
|
-
mkdir -p ./raw .pi/harness/specs .pi/harness/runs .pi/harness/incidents .pi/harness/debates
|
|
98
|
-
```
|
|
75
|
+
| Symptom | Likely cause |
|
|
76
|
+
|---------|----------------|
|
|
77
|
+
| `unknown command '.'` | Wrong CLI — use `graphify update .`, never `graphify .` |
|
|
78
|
+
| Empty or missing `graphify-out/` | Build step skipped or failed; re-run bootstrap |
|
|
79
|
+
| `graph.json` exists but 0 nodes | Stale/partial output — re-run with `--force` |
|
|
80
|
+
| `graphify extract` fails | No API key — code graph from `update` is still valid; note in report |
|
|
99
81
|
|
|
100
82
|
## Step 1.5 — Optional Self-Hosted Firecrawl
|
|
101
83
|
|
|
@@ -225,9 +207,36 @@ docker compose -f firecrawl/docker-compose.yaml ps
|
|
|
225
207
|
If user chose **cloud**, skip all 1.5.x steps. Just note:
|
|
226
208
|
> "Using cloud Firecrawl. Ensure `FIRECRAWL_API_KEY` is set. Run `firecrawl login` in Step 2.1."
|
|
227
209
|
|
|
228
|
-
## Step 2 — Install Global CLI
|
|
210
|
+
## Step 2 — Install & Verify Global CLI Tools (skip if `--skip-tools`)
|
|
229
211
|
|
|
230
|
-
|
|
212
|
+
Run the bundled verifier from the **project root**. It installs missing npm globals, fixes common **Linux system dependencies** (Chrome libs for `agent-browser`), runs smoke tests, and exits non-zero if a required tool fails.
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
bash scripts/harness-cli-verify.sh
|
|
216
|
+
# ultimate-pi checkout: npm run harness:cli-verify
|
|
217
|
+
# Reinstall everything: bash scripts/harness-cli-verify.sh --force
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Required (script must exit 0):** firecrawl-cli, ctx7, biome, ast-grep (`sg`), sentrux (when harness manifest present).
|
|
221
|
+
|
|
222
|
+
**Warnings allowed:** gh (if not authenticated), agent-browser (if OS libs need manual `sudo apt-get install`), ck (empty corpus on tiny repos).
|
|
223
|
+
|
|
224
|
+
If the script reports **agent-browser shared library errors** on Linux/WSL, run the fix it prints, then re-verify:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
sudo apt-get update
|
|
228
|
+
sudo apt-get install -y libnss3 libnspr4 libgbm1 libatk1.0-0 libatk-bridge2.0-0 \
|
|
229
|
+
libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
|
|
230
|
+
libasound2 libpango-1.0-0 libcairo2 libx11-6 libxcb1 libxext6 fonts-liberation
|
|
231
|
+
agent-browser install --with-deps
|
|
232
|
+
bash scripts/harness-cli-verify.sh
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Do not continue** past Step 2 if `harness-cli-verify.sh` exits non-zero.
|
|
236
|
+
|
|
237
|
+
### Manual reference (if script missing in target repo)
|
|
238
|
+
|
|
239
|
+
Copy `scripts/harness-cli-verify.sh` from ultimate-pi, or install tools individually:
|
|
231
240
|
|
|
232
241
|
### 2.1 — firecrawl-cli (Web Search + Scrape + Crawl + Interact + Download + Parse)
|
|
233
242
|
|
|
@@ -260,9 +269,8 @@ firecrawl login --browser
|
|
|
260
269
|
firecrawl login --api-key "<key>"
|
|
261
270
|
```
|
|
262
271
|
|
|
263
|
-
|
|
272
|
+
Quick smoke test (skills ship with `ultimate-pi` via npm — do **not** run `firecrawl setup skills`):
|
|
264
273
|
```bash
|
|
265
|
-
firecrawl setup skills
|
|
266
274
|
mkdir -p .firecrawl
|
|
267
275
|
firecrawl scrape "https://firecrawl.dev" -o .firecrawl/install-check.md
|
|
268
276
|
```
|
|
@@ -404,7 +412,11 @@ Configure MCP server in `.pi/mcp.json` (see Step 4.3).
|
|
|
404
412
|
|
|
405
413
|
Generate architectural rules from the harness manifest (creates/updates `.sentrux/rules.toml`):
|
|
406
414
|
```bash
|
|
415
|
+
# From ultimate-pi checkout:
|
|
407
416
|
npm run harness:sentrux-sync
|
|
417
|
+
# From an external project (after pi install npm:ultimate-pi):
|
|
418
|
+
node "$(node -p "require('path').join(require('path').dirname(require.resolve('ultimate-pi/package.json')),'scripts/sentrux-rules-sync.mjs')")" --force
|
|
419
|
+
# Or in pi: /harness-sentrux-sync
|
|
408
420
|
```
|
|
409
421
|
|
|
410
422
|
Edit layers/boundaries in `.pi/harness/sentrux/architecture.manifest.json` when the repo layout changes, then re-run sync. Custom TOML below the `harness:managed` markers is preserved.
|
|
@@ -476,27 +488,38 @@ function model(prefix, name) { return `${prefix}/${name}`; }
|
|
|
476
488
|
// Best available high-end model per provider
|
|
477
489
|
const highModel = hasOpenCode
|
|
478
490
|
? model('opencode-go', 'deepseek-v4-pro')
|
|
479
|
-
:
|
|
480
|
-
?
|
|
481
|
-
:
|
|
482
|
-
? '
|
|
483
|
-
:
|
|
491
|
+
: hasAnthropic
|
|
492
|
+
? 'anthropic/claude-sonnet-4-20250514'
|
|
493
|
+
: hasGoogle
|
|
494
|
+
? 'google/gemini-2.5-flash-001'
|
|
495
|
+
: hasOpenAI
|
|
496
|
+
? model('openai', 'gpt-4o')
|
|
497
|
+
: null;
|
|
484
498
|
|
|
485
499
|
const mediumModel = hasOpenCode
|
|
486
500
|
? model('opencode-go', 'qwen3.6-plus')
|
|
487
|
-
:
|
|
488
|
-
?
|
|
489
|
-
:
|
|
490
|
-
? '
|
|
491
|
-
:
|
|
501
|
+
: hasAnthropic
|
|
502
|
+
? 'anthropic/claude-sonnet-4-20250514'
|
|
503
|
+
: hasGoogle
|
|
504
|
+
? 'google/gemini-flash-latest'
|
|
505
|
+
: hasOpenAI
|
|
506
|
+
? model('openai', 'gpt-4o-mini')
|
|
507
|
+
: null;
|
|
492
508
|
|
|
493
509
|
const lowModel = hasOpenCode
|
|
494
510
|
? model('opencode-go', 'deepseek-v4-flash')
|
|
495
|
-
:
|
|
496
|
-
?
|
|
497
|
-
:
|
|
498
|
-
? '
|
|
499
|
-
:
|
|
511
|
+
: hasAnthropic
|
|
512
|
+
? 'anthropic/claude-3-5-haiku-20241022'
|
|
513
|
+
: hasGoogle
|
|
514
|
+
? 'google/gemini-flash-lite-latest'
|
|
515
|
+
: hasOpenAI
|
|
516
|
+
? model('openai', 'gpt-4o-mini')
|
|
517
|
+
: null;
|
|
518
|
+
|
|
519
|
+
if (!highModel || !mediumModel || !lowModel) {
|
|
520
|
+
console.log('✗ No AI provider env detected — skip model-router.json (set OPENAI_API_BASE for opencode, or ANTHROPIC/GOOGLE/OPENAI keys)');
|
|
521
|
+
process.exit(0);
|
|
522
|
+
}
|
|
500
523
|
|
|
501
524
|
const fallbacks = [];
|
|
502
525
|
if (hasAnthropic && !highModel.startsWith('anthropic/')) fallbacks.push('anthropic/claude-3-5-sonnet-20241022');
|
|
@@ -552,7 +575,7 @@ fi
|
|
|
552
575
|
|
|
553
576
|
Do NOT block. If generation fails, warn in report and continue.
|
|
554
577
|
|
|
555
|
-
**Router
|
|
578
|
+
**Router is opt-in** — ultimate-pi no longer forces `defaultProvider: router` on install. After generating `model-router.json`, tell the user to enable routing when ready:
|
|
556
579
|
|
|
557
580
|
> `/router profile auto`
|
|
558
581
|
|
|
@@ -616,16 +639,16 @@ Created: $(date +%Y-%m-%d)
|
|
|
616
639
|
|
|
617
640
|
## Structure
|
|
618
641
|
|
|
619
|
-
- graphify-out/ → Knowledge graph (run `graphify .` to build)
|
|
642
|
+
- graphify-out/ → Knowledge graph (run `graphify update .` to build)
|
|
620
643
|
- ./raw/ → Source documents for graphify ingestion
|
|
621
644
|
- .pi/harness/specs/ → Harness contracts and schema docs
|
|
622
645
|
- .pi/harness/incidents/ → Incident and override records
|
|
623
|
-
-
|
|
646
|
+
- `.agents/skills/` (npm package) → Harness skills (no copy into `.pi/skills/` needed)
|
|
624
647
|
- .pi/agents/ → Specialized agents
|
|
625
648
|
|
|
626
649
|
## Graphify-First Workflow
|
|
627
650
|
|
|
628
|
-
1. Run `graphify
|
|
651
|
+
1. Run `graphify update .` to build/update the knowledge graph (AST, no API cost)
|
|
629
652
|
2. Read `graphify-out/GRAPH_REPORT.md` for god nodes and surprising connections
|
|
630
653
|
3. Query: `graphify query "question"`
|
|
631
654
|
4. Harness contracts and governance records in `.pi/harness/specs/` and `.pi/harness/incidents/`
|
|
@@ -635,32 +658,52 @@ Created: $(date +%Y-%m-%d)
|
|
|
635
658
|
- Graph before grep — always consult the knowledge graph first
|
|
636
659
|
- ./raw/ is source storage for graphify
|
|
637
660
|
- Decisions and incidents in `.pi/harness/` with structured artifacts
|
|
638
|
-
- `graphify
|
|
661
|
+
- `GRAPHIFY_VIZ_NODE_LIMIT=200000 graphify update .` after significant code changes
|
|
639
662
|
- ast-grep (`sg`) is the default code search tool — use `sg -p 'pattern'` for structural search, never grep for code
|
|
640
663
|
- Create `.sg/rules/` for project-wide code quality rules
|
|
641
664
|
```
|
|
642
665
|
|
|
643
666
|
## Step 5 — Verification
|
|
644
667
|
|
|
645
|
-
|
|
668
|
+
Re-run CLI verification (must pass unless `--skip-tools`):
|
|
646
669
|
|
|
647
670
|
```bash
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
ck --version 2>/dev/null && echo "✓ ck-search" || echo "✗ ck-search"
|
|
653
|
-
biome --version 2>/dev/null && echo "✓ biome" || echo "✗ biome"
|
|
654
|
-
sg --version 2>/dev/null && echo "✓ ast-grep" || echo "✗ ast-grep"
|
|
655
|
-
gh --version 2>/dev/null && echo "✓ gh" || echo "✗ gh"
|
|
656
|
-
sentrux --version 2>/dev/null && echo "✓ sentrux" || echo "✗ sentrux"
|
|
671
|
+
bash scripts/harness-cli-verify.sh
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
Then run the remaining checks:
|
|
657
675
|
|
|
676
|
+
```bash
|
|
658
677
|
# pi extensions
|
|
659
678
|
cd .pi/npm && npm ls 2>/dev/null && echo "✓ pi extensions" || echo "✗ pi extensions"
|
|
660
679
|
|
|
661
|
-
# graphify knowledge graph
|
|
662
|
-
|
|
663
|
-
|
|
680
|
+
# graphify knowledge graph (pip/pip3, uv, apt, or PATH)
|
|
681
|
+
PIP_CMD=""
|
|
682
|
+
command -v pip &>/dev/null && PIP_CMD=pip
|
|
683
|
+
[ -z "$PIP_CMD" ] && command -v pip3 &>/dev/null && PIP_CMD=pip3
|
|
684
|
+
|
|
685
|
+
if command -v graphify &>/dev/null; then
|
|
686
|
+
echo "✓ graphify ($(command -v graphify))"
|
|
687
|
+
elif [ -n "$PIP_CMD" ] && $PIP_CMD show graphifyy &>/dev/null 2>&1; then
|
|
688
|
+
echo "✓ graphify ($PIP_CMD)"
|
|
689
|
+
elif command -v uv &>/dev/null && uv pip show graphifyy &>/dev/null 2>&1; then
|
|
690
|
+
echo "✓ graphify (uv pip)"
|
|
691
|
+
elif command -v uv &>/dev/null && uv tool list 2>/dev/null | grep -qE '(^|[[:space:]])graphifyy([[:space:]]|$)'; then
|
|
692
|
+
echo "✓ graphify (uv tool)"
|
|
693
|
+
elif dpkg -l 2>/dev/null | grep -qE '^ii[[:space:]]+(python3-)?graphify' || apt list --installed 2>/dev/null | grep -qi graphify; then
|
|
694
|
+
echo "✓ graphify (apt)"
|
|
695
|
+
else
|
|
696
|
+
echo "✗ graphify not installed"
|
|
697
|
+
fi
|
|
698
|
+
python3 -c "
|
|
699
|
+
import json, sys
|
|
700
|
+
from pathlib import Path
|
|
701
|
+
gj, gr = Path('graphify-out/graph.json'), Path('graphify-out/GRAPH_REPORT.md')
|
|
702
|
+
if not gj.is_file() or not gr.is_file():
|
|
703
|
+
print('✗ knowledge graph missing (need graph.json + GRAPH_REPORT.md)'); sys.exit(0)
|
|
704
|
+
n = len(json.loads(gj.read_text()).get('nodes') or [])
|
|
705
|
+
print(f'✓ knowledge graph built ({n} nodes)' if n else '✗ graph.json has 0 nodes — re-run harness-graphify-bootstrap.sh --force')
|
|
706
|
+
" 2>/dev/null || echo "✗ no graph built yet"
|
|
664
707
|
graphify hook status 2>/dev/null && echo "✓ graphify git hooks installed" || echo "✗ graphify git hooks not installed"
|
|
665
708
|
|
|
666
709
|
# model router
|
|
@@ -721,7 +764,7 @@ Output summary table:
|
|
|
721
764
|
|
|
722
765
|
Next steps:
|
|
723
766
|
1. If tools missing: re-run with `--force` or install individually
|
|
724
|
-
2. If graph not built: run `graphify
|
|
767
|
+
2. If graph not built: run `bash scripts/harness-graphify-bootstrap.sh` (or `graphify update .` from project root)
|
|
725
768
|
3. If hooks not installed: run `graphify hook install`
|
|
726
769
|
4. If gh not authenticated: `gh auth login`
|
|
727
770
|
5. If self-hosted Firecrawl unhealthy: `docker compose -f firecrawl/docker-compose.yaml logs`
|
|
@@ -731,7 +774,10 @@ Next steps:
|
|
|
731
774
|
## Guard Rails
|
|
732
775
|
|
|
733
776
|
- **Internet required**: Several tools need npm registry access. Block if offline.
|
|
777
|
+
- **CLI verify script**: Step 2 and Step 5 use `scripts/harness-cli-verify.sh` — installs npm globals, Linux Chrome system libs for `agent-browser`, and smoke-tests each tool. Block on non-zero exit.
|
|
734
778
|
- **Graphify requires Python 3.10+**: Check `python3 --version`. Block if too old.
|
|
779
|
+
- **Graphify bootstrap is mandatory** (unless `--skip-graphify`): Run `scripts/harness-graphify-bootstrap.sh`. Never use `graphify . --wiki`. Initial setup must run `graphify update .` and verify `graphify-out/graph.json` has nodes.
|
|
780
|
+
- **Python packages (Graphify)**: Before install, detect via PATH, `pip`/`pip3 show graphifyy`, `uv`, or apt. Prefer `uv tool install graphifyy`.
|
|
735
781
|
- **Node.js >= 18 required**: Some pi packages use modern Node APIs.
|
|
736
782
|
- **Docker required for self-hosted**: Step 1.5 needs Docker Engine + Compose. Block if install fails.
|
|
737
783
|
- **Sufficient RAM for self-hosted**: Firecrawl stack needs ~8GB+ free (API: 8G, Playwright: 4G, others).
|
|
@@ -748,12 +794,17 @@ Next steps:
|
|
|
748
794
|
| Node < 18 | Block. Report required version. |
|
|
749
795
|
| npm not found | Block. Suggest install method per OS. |
|
|
750
796
|
| Python < 3.10 | Block. Report required Python version for Graphify. |
|
|
751
|
-
|
|
|
797
|
+
| CLI verify script fails | Read per-tool ✗ lines. Re-run with `--force`. Fix agent-browser libs via apt (see Step 2). |
|
|
798
|
+
| agent-browser libnspr4 / shared library | `sudo apt-get install -y libnss3 libnspr4 libgbm1 ...` then `agent-browser install --with-deps`. |
|
|
799
|
+
| Graphify install fails | Show installer output. Retry `uv tool install graphifyy` or `pip3 install --user graphifyy`. Ensure `~/.local/bin` is on PATH. |
|
|
800
|
+
| `graphify update .` fails | Block setup. Corpus may have no code files, or graphify not on PATH. Show stderr. |
|
|
801
|
+
| Invalid `graphify .` usage | Replace with `graphify update .` — the `.` subcommand does not exist. |
|
|
802
|
+
| graphify-out empty / 0 nodes | Re-run `bash scripts/harness-graphify-bootstrap.sh --force` from project root. |
|
|
752
803
|
| graphify hook install fails | Hooks need `.git/` directory. Verify inside git repo. Manual: `git config core.hooksPath .pi/git-hooks` |
|
|
753
804
|
| firecrawl auth failed | Show manual login instructions. Continue with other tools. |
|
|
754
805
|
| gh not installed | Show GitHub CLI install link. Skip label creation. |
|
|
755
806
|
| pi packages install fail | Show error output. Check npm permissions. |
|
|
756
|
-
| graph already exists | Report
|
|
807
|
+
| graph already exists | Report node count. Refresh with `graphify update .` unless user passed `--force`. |
|
|
757
808
|
| biome.json missing | Create minimal config. |
|
|
758
809
|
| settings.json not writable | Warn. Settings won't persist across sessions. |
|
|
759
810
|
| No internet | Block for tool installs. Continue for graphify-only steps if `--skip-tools`. |
|
|
@@ -767,7 +818,7 @@ Next steps:
|
|
|
767
818
|
|
|
768
819
|
| Flag | Effect |
|
|
769
820
|
|------|--------|
|
|
770
|
-
| `--skip-graphify` | Skip Step
|
|
821
|
+
| `--skip-graphify` | Skip Step 0.5 (graph build). Only when a valid `graphify-out/graph.json` already exists. |
|
|
771
822
|
| `--skip-tools` | Skip Step 2 (CLI tool installs). Use when tools already set up. |
|
|
772
823
|
| `--skip-firecrawl-self` | Skip Step 1.5 (self-hosted Firecrawl). Always use cloud. |
|
|
773
824
|
| `--force` | Reinstall all tools even if already present. Overwrite existing files. |
|
package/.pi/settings.json
CHANGED
package/AGENTS.md
CHANGED
|
@@ -31,3 +31,15 @@ Created: 2026-05-14
|
|
|
31
31
|
- `graphify update .` after significant code changes
|
|
32
32
|
- ast-grep (`sg`) is the default code search tool — use `sg -p 'pattern'` for structural search, never grep for code
|
|
33
33
|
- Self-hosted Firecrawl at http://localhost:3002 (FIRECRAWL_API_URL)
|
|
34
|
+
|
|
35
|
+
## graphify
|
|
36
|
+
|
|
37
|
+
This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
|
|
38
|
+
|
|
39
|
+
When the user types `/graphify`, invoke the `skill` tool with `skill: "graphify"` before doing anything else.
|
|
40
|
+
|
|
41
|
+
Rules:
|
|
42
|
+
- ALWAYS read graphify-out/GRAPH_REPORT.md before reading any source files, running grep/glob searches, or answering codebase questions. The graph is your primary map of the codebase.
|
|
43
|
+
- IF graphify-out/wiki/index.md EXISTS, navigate it instead of reading raw files
|
|
44
|
+
- For cross-module "how does X relate to Y" questions, prefer `graphify query "<question>"`, `graphify path "<A>" "<B>"`, or `graphify explain "<concept>"` over grep — these traverse the graph's EXTRACTED + INFERRED edges instead of scanning files
|
|
45
|
+
- After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost).
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v0.2.4] — 2026-05-15
|
|
6
|
+
|
|
7
|
+
### 🐛 Fixes
|
|
8
|
+
|
|
9
|
+
- Stop forcing `router/auto` on install (avoids defaulting to `gpt-5.4-pro` when no `.pi/model-router.json`)
|
|
10
|
+
- Bootstrap `model-router.json` from detected providers when missing
|
|
11
|
+
- Load banner and sentrux sync script from the npm package root, not the host project's cwd
|
|
12
|
+
- Remove redundant `firecrawl setup skills` from harness-setup (skills ship with the package)
|
|
13
|
+
|
|
14
|
+
### 📖 Documentation
|
|
15
|
+
|
|
16
|
+
- Add `.pi/model-router.example.json` and README note on opt-in model routing
|
|
17
|
+
|
|
5
18
|
## [v0.2.3] — 2026-05-15
|
|
6
19
|
|
|
7
20
|
### ✨ Features
|