ultimate-pi 0.2.4 → 0.2.5
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/.pi/extensions/lib/harness-paths.ts +8 -0
- package/.pi/extensions/sentrux-rules-sync.ts +2 -8
- package/.pi/harness/browser.json +5 -1
- package/.pi/harness/debates/README.md +9 -0
- package/.pi/harness/docs/adrs/0006-sentrux-dual-layer.md +1 -1
- package/.pi/harness/docs/adrs/0009-sentrux-rules-lifecycle.md +2 -2
- package/.pi/harness/incidents/README.md +6 -0
- package/.pi/harness/release-readiness-report.md +128 -0
- package/.pi/harness/router/proposals/canary-proposal.json +96 -0
- package/.pi/harness/runs/019e272f-3eef-7107-9712-ce281de55707-1778773891854/events.jsonl +2 -0
- package/.pi/harness/runs/019e272f-3eef-7107-9712-ce281de55707-1778773891854/trace.json +17 -0
- package/.pi/harness/runs/019e272f-3eef-7107-9712-ce281de55707-1778773912057/events.jsonl +2 -0
- package/.pi/harness/runs/019e272f-3eef-7107-9712-ce281de55707-1778773912057/trace.json +17 -0
- package/.pi/harness/runs/019e2732-8651-74e5-9f5d-4d06c3105f25-1778774086096/events.jsonl +6 -0
- package/.pi/harness/runs/019e2732-8651-74e5-9f5d-4d06c3105f25-1778774086096/trace.json +42 -0
- package/.pi/harness/runs/019e2732-8651-74e5-9f5d-4d06c3105f25-1778774136101/events.jsonl +1 -0
- package/.pi/harness/runs/019e2758-b332-771b-ad6f-54d0d8478768-1778776600591/events.jsonl +2 -0
- package/.pi/harness/runs/019e2758-b332-771b-ad6f-54d0d8478768-1778776600591/trace.json +17 -0
- package/.pi/harness/runs/README.md +6 -0
- package/.pi/harness/runs/budget-events.jsonl +4 -0
- package/.pi/harness/runs/canary-candidate-router.json +72 -0
- package/.pi/harness/runs/canary-evidence.json +9 -0
- package/.pi/harness/runs/index.jsonl +4 -0
- package/.pi/harness/sentrux/architecture.manifest.json +3 -3
- package/.pi/model-router.json +95 -0
- package/.pi/prompts/harness-setup.md +13 -14
- package/.pi/prompts/release.md +225 -0
- package/.pi/scripts/README.md +17 -0
- package/{scripts → .pi/scripts}/harness-verify.mjs +3 -3
- package/{scripts → .pi/scripts}/sentrux-rules-sync.mjs +2 -2
- package/.sentrux/.harness-rules-meta.json +2 -2
- package/.sentrux/rules.toml +3 -3
- package/CHANGELOG.md +8 -0
- package/firecrawl/.env +53 -0
- package/package.json +15 -5
- package/.ckignore +0 -41
- package/.codex/hooks.json +0 -15
- package/.env.example +0 -21
- package/.gitattributes +0 -1
- package/.github/banner-v2.png +0 -0
- package/.github/workflows/lint.yml +0 -33
- package/.github/workflows/publish-github-packages.yml +0 -35
- package/.github/workflows/publish-npm.yml +0 -32
- package/CONTRIBUTING.md +0 -166
- package/lefthook.yml +0 -9
- package/scripts/__pycache__/merge_graphify_corpora.cpython-314.pyc +0 -0
- package/scripts/index_youtube_urls.py +0 -376
- package/scripts/merge_graphify_corpora.py +0 -398
- package/scripts/regen_graphify_html.py +0 -46
- package/test/harness-verify.test.mjs +0 -33
- /package/{scripts → .pi/scripts}/harness-cli-verify.sh +0 -0
- /package/{scripts → .pi/scripts}/harness-graphify-bootstrap.sh +0 -0
|
@@ -49,15 +49,14 @@ Run from the **project root** (the external repo root, not ultimate-pi unless th
|
|
|
49
49
|
mkdir -p ./raw .pi/harness/specs .pi/harness/runs .pi/harness/incidents .pi/harness/debates
|
|
50
50
|
|
|
51
51
|
# Bundled with ultimate-pi harness; copy path if bootstrap runs from a linked harness checkout
|
|
52
|
-
bash scripts/harness-graphify-bootstrap.sh
|
|
52
|
+
bash "$(node -p "require('path').join(require('path').dirname(require.resolve('ultimate-pi/package.json')),'.pi/scripts/harness-graphify-bootstrap.sh')")"
|
|
53
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
|
|
55
54
|
|
|
56
55
|
# Pass --force when $ARGUMENTS contains --force to rebuild an existing graph:
|
|
57
|
-
#
|
|
56
|
+
# npm run harness:graphify-bootstrap -- --force
|
|
58
57
|
```
|
|
59
58
|
|
|
60
|
-
If
|
|
59
|
+
If the bootstrap script is missing, run it from the installed ultimate-pi package (`.pi/scripts/` inside the npm package), or execute equivalent steps manually:
|
|
61
60
|
|
|
62
61
|
1. Install `graphifyy` (`uv tool install` preferred; else `pip`/`pip3 install --user`)
|
|
63
62
|
2. `graphify install --platform pi` (and `graphify cursor install` if `.cursor/` exists)
|
|
@@ -212,9 +211,9 @@ If user chose **cloud**, skip all 1.5.x steps. Just note:
|
|
|
212
211
|
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
212
|
|
|
214
213
|
```bash
|
|
215
|
-
|
|
214
|
+
npm run harness:cli-verify
|
|
216
215
|
# ultimate-pi checkout: npm run harness:cli-verify
|
|
217
|
-
# Reinstall everything:
|
|
216
|
+
# Reinstall everything: npm run harness:cli-verify -- --force
|
|
218
217
|
```
|
|
219
218
|
|
|
220
219
|
**Required (script must exit 0):** firecrawl-cli, ctx7, biome, ast-grep (`sg`), sentrux (when harness manifest present).
|
|
@@ -229,14 +228,14 @@ sudo apt-get install -y libnss3 libnspr4 libgbm1 libatk1.0-0 libatk-bridge2.0-0
|
|
|
229
228
|
libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
|
|
230
229
|
libasound2 libpango-1.0-0 libcairo2 libx11-6 libxcb1 libxext6 fonts-liberation
|
|
231
230
|
agent-browser install --with-deps
|
|
232
|
-
|
|
231
|
+
npm run harness:cli-verify
|
|
233
232
|
```
|
|
234
233
|
|
|
235
234
|
**Do not continue** past Step 2 if `harness-cli-verify.sh` exits non-zero.
|
|
236
235
|
|
|
237
236
|
### Manual reference (if script missing in target repo)
|
|
238
237
|
|
|
239
|
-
|
|
238
|
+
Use `npm run harness:cli-verify` from the installed ultimate-pi package, or install tools individually:
|
|
240
239
|
|
|
241
240
|
### 2.1 — firecrawl-cli (Web Search + Scrape + Crawl + Interact + Download + Parse)
|
|
242
241
|
|
|
@@ -415,7 +414,7 @@ Generate architectural rules from the harness manifest (creates/updates `.sentru
|
|
|
415
414
|
# From ultimate-pi checkout:
|
|
416
415
|
npm run harness:sentrux-sync
|
|
417
416
|
# From an external project (after pi install npm:ultimate-pi):
|
|
418
|
-
|
|
417
|
+
npm run harness:sentrux-sync
|
|
419
418
|
# Or in pi: /harness-sentrux-sync
|
|
420
419
|
```
|
|
421
420
|
|
|
@@ -668,7 +667,7 @@ Created: $(date +%Y-%m-%d)
|
|
|
668
667
|
Re-run CLI verification (must pass unless `--skip-tools`):
|
|
669
668
|
|
|
670
669
|
```bash
|
|
671
|
-
|
|
670
|
+
npm run harness:cli-verify
|
|
672
671
|
```
|
|
673
672
|
|
|
674
673
|
Then run the remaining checks:
|
|
@@ -764,7 +763,7 @@ Output summary table:
|
|
|
764
763
|
|
|
765
764
|
Next steps:
|
|
766
765
|
1. If tools missing: re-run with `--force` or install individually
|
|
767
|
-
2. If graph not built: run `
|
|
766
|
+
2. If graph not built: run `npm run harness:graphify-bootstrap` (or `graphify update .` from project root)
|
|
768
767
|
3. If hooks not installed: run `graphify hook install`
|
|
769
768
|
4. If gh not authenticated: `gh auth login`
|
|
770
769
|
5. If self-hosted Firecrawl unhealthy: `docker compose -f firecrawl/docker-compose.yaml logs`
|
|
@@ -774,9 +773,9 @@ Next steps:
|
|
|
774
773
|
## Guard Rails
|
|
775
774
|
|
|
776
775
|
- **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.
|
|
776
|
+
- **CLI verify script**: Step 2 and Step 5 use `npm run harness:cli-verify` (`.pi/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.
|
|
778
777
|
- **Graphify requires Python 3.10+**: Check `python3 --version`. Block if too old.
|
|
779
|
-
- **Graphify bootstrap is mandatory** (unless `--skip-graphify`): Run `
|
|
778
|
+
- **Graphify bootstrap is mandatory** (unless `--skip-graphify`): Run `npm run harness:graphify-bootstrap`. Never use `graphify . --wiki`. Initial setup must run `graphify update .` and verify `graphify-out/graph.json` has nodes.
|
|
780
779
|
- **Python packages (Graphify)**: Before install, detect via PATH, `pip`/`pip3 show graphifyy`, `uv`, or apt. Prefer `uv tool install graphifyy`.
|
|
781
780
|
- **Node.js >= 18 required**: Some pi packages use modern Node APIs.
|
|
782
781
|
- **Docker required for self-hosted**: Step 1.5 needs Docker Engine + Compose. Block if install fails.
|
|
@@ -799,7 +798,7 @@ Next steps:
|
|
|
799
798
|
| Graphify install fails | Show installer output. Retry `uv tool install graphifyy` or `pip3 install --user graphifyy`. Ensure `~/.local/bin` is on PATH. |
|
|
800
799
|
| `graphify update .` fails | Block setup. Corpus may have no code files, or graphify not on PATH. Show stderr. |
|
|
801
800
|
| Invalid `graphify .` usage | Replace with `graphify update .` — the `.` subcommand does not exist. |
|
|
802
|
-
| graphify-out empty / 0 nodes | Re-run `
|
|
801
|
+
| graphify-out empty / 0 nodes | Re-run `npm run harness:graphify-bootstrap -- --force` from project root. |
|
|
803
802
|
| graphify hook install fails | Hooks need `.git/` directory. Verify inside git repo. Manual: `git config core.hooksPath .pi/git-hooks` |
|
|
804
803
|
| firecrawl auth failed | Show manual login instructions. Continue with other tools. |
|
|
805
804
|
| gh not installed | Show GitHub CLI install link. Skip label creation. |
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Release a new version — bump version, generate changelog, tag, and push to trigger GitHub Actions CI/CD publish.
|
|
3
|
+
argument-hint: "[patch|minor|major] [--dry-run]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# release — Version Bump + Changelog + Tag + Push
|
|
7
|
+
|
|
8
|
+
Releases a new version by bumping `package.json`, generating a `CHANGELOG.md` entry from commits since the last tag, committing, tagging, and pushing the tag. The push triggers `.github/workflows/publish-github-packages.yml` and `.github/workflows/publish-npm.yml`.
|
|
9
|
+
|
|
10
|
+
## Step 0 — Parse arguments
|
|
11
|
+
|
|
12
|
+
Read `$ARGUMENTS`. First positional arg is the bump type:
|
|
13
|
+
|
|
14
|
+
| Arg | Semver | When |
|
|
15
|
+
|-----|--------|------|
|
|
16
|
+
| `patch` | 0.1.X → 0.1.(X+1) | Bug fixes, small changes, chores |
|
|
17
|
+
| `minor` | 0.X.0 → 0.(X+1).0 | New features, dep additions |
|
|
18
|
+
| `major` | X.0.0 → (X+1).0.0 | Breaking changes |
|
|
19
|
+
|
|
20
|
+
If no bump type given: scan commits since last tag for conventional commit prefixes to infer:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git log $(git describe --tags --abbrev=0 2>/dev/null || echo "")..HEAD --format="%s" 2>/dev/null
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Inference rules:
|
|
27
|
+
- Any `feat!:` or `BREAKING CHANGE` → **major**
|
|
28
|
+
- Any `feat:` → **minor**
|
|
29
|
+
- Everything else (`fix:`, `chore:`, `docs:`, `refactor:`, etc.) → **patch**
|
|
30
|
+
|
|
31
|
+
If no commits since last tag, warn: "No commits since last tag. Nothing to release." and stop.
|
|
32
|
+
|
|
33
|
+
Present the inferred bump type to user. If they passed one explicitly, use that. If `--dry-run`, show what would happen without making changes.
|
|
34
|
+
|
|
35
|
+
## Step 1 — Read current version
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node -e "console.log(require('./package.json').version)"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Store as `$CURRENT_VERSION`.
|
|
42
|
+
|
|
43
|
+
Compute `$NEW_VERSION`:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Pseudo-code — use node for precision
|
|
47
|
+
NEW_VERSION=$(node -e "
|
|
48
|
+
const [maj,min,pat] = '$CURRENT_VERSION'.split('.').map(Number);
|
|
49
|
+
const bump = '$BUMP_TYPE';
|
|
50
|
+
if (bump === 'major') console.log((maj+1)+'.0.0');
|
|
51
|
+
else if (bump === 'minor') console.log(maj+'.'+(min+1)+'.0');
|
|
52
|
+
else console.log(maj+'.'+min+'.'+(pat+1));
|
|
53
|
+
")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Step 2 — Pre-flight checks
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Must be in a git repo
|
|
60
|
+
git rev-parse --is-inside-work-tree || { echo "Not a git repo. Abort."; exit 1; }
|
|
61
|
+
|
|
62
|
+
# Must have a remote
|
|
63
|
+
git remote -v | grep -q origin || { echo "No origin remote. Abort."; exit 1; }
|
|
64
|
+
|
|
65
|
+
# Must be on a clean working tree
|
|
66
|
+
git diff --quiet && git diff --cached --quiet || { echo "Working tree is dirty. Commit or stash changes first."; exit 1; }
|
|
67
|
+
|
|
68
|
+
# Must be on a branch that can push (not detached HEAD)
|
|
69
|
+
git symbolic-ref -q HEAD || { echo "Detached HEAD. Switch to a branch first."; exit 1; }
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Step 3 — Generate changelog
|
|
73
|
+
|
|
74
|
+
Gather commits since last tag:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
|
78
|
+
if [ -z "$LAST_TAG" ]; then
|
|
79
|
+
COMMITS=$(git log --oneline --no-merges HEAD)
|
|
80
|
+
else
|
|
81
|
+
COMMITS=$(git log --oneline --no-merges ${LAST_TAG}..HEAD)
|
|
82
|
+
fi
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Parse conventional commit prefixes to group:
|
|
86
|
+
|
|
87
|
+
| Prefix | Changelog Section |
|
|
88
|
+
|--------|-------------------|
|
|
89
|
+
| `feat!:` | ⚠️ Breaking Changes |
|
|
90
|
+
| `feat:` | ✨ Features |
|
|
91
|
+
| `fix:` | 🐛 Fixes |
|
|
92
|
+
| `perf:` | ⚡ Performance |
|
|
93
|
+
| `refactor:` | ♻️ Refactoring |
|
|
94
|
+
| `docs:` | 📖 Documentation |
|
|
95
|
+
| `style:` | 🎨 Style |
|
|
96
|
+
| `test:` | ✅ Tests |
|
|
97
|
+
| `chore:` | 🔧 Chores |
|
|
98
|
+
| `ci:` | 🔄 CI/CD |
|
|
99
|
+
| `build:` | 📦 Build |
|
|
100
|
+
| everything else | 🔧 Chores |
|
|
101
|
+
|
|
102
|
+
Generate the changelog entry:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
## [v$NEW_VERSION] — $(date +%Y-%m-%d)
|
|
106
|
+
|
|
107
|
+
### $SECTION_NAME
|
|
108
|
+
|
|
109
|
+
- $commit_message (no prefix, just the description)
|
|
110
|
+
|
|
111
|
+
...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
If `CHANGELOG.md` exists, prepend the new entry after the `# Changelog` heading. If not, create it:
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
# Changelog
|
|
118
|
+
|
|
119
|
+
All notable changes to this project are documented in this file.
|
|
120
|
+
|
|
121
|
+
## [v$NEW_VERSION] — $(date +%Y-%m-%d)
|
|
122
|
+
|
|
123
|
+
### $SECTION
|
|
124
|
+
|
|
125
|
+
- $entry
|
|
126
|
+
|
|
127
|
+
...
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Step 4 — Bump version in package.json
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm pkg set version="$NEW_VERSION"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Verify:
|
|
137
|
+
```bash
|
|
138
|
+
node -e "const v = require('./package.json').version; console.log(v === '$NEW_VERSION' ? '✓ version bumped to $NEW_VERSION' : '✗ version mismatch')"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Step 5 — Dry run check
|
|
142
|
+
|
|
143
|
+
If `--dry-run` flag: print summary and stop. Do NOT commit, tag, or push.
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
DRY RUN — no changes made.
|
|
147
|
+
Version: $CURRENT_VERSION → $NEW_VERSION
|
|
148
|
+
Bump: $BUMP_TYPE
|
|
149
|
+
Commits since $LAST_TAG: $COMMIT_COUNT
|
|
150
|
+
Files that would change:
|
|
151
|
+
- package.json (version)
|
|
152
|
+
- CHANGELOG.md (new entry)
|
|
153
|
+
Tag that would be created: v$NEW_VERSION
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Step 6 — Commit version bump + changelog
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
git add package.json CHANGELOG.md
|
|
160
|
+
|
|
161
|
+
git commit -m "chore(release): bump to v$NEW_VERSION" -m "- Bump version in package.json
|
|
162
|
+
- Add changelog entry for v$NEW_VERSION
|
|
163
|
+
|
|
164
|
+
Commits included:
|
|
165
|
+
$(echo "$COMMITS" | sed 's/^/- /')" -m "Co-authored-by: pi-mono <261679550+pi-mono@users.noreply.github.com>"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Use the co-author from `.pi/auto-commit.json` if available, otherwise use the default pi-mono co-author.
|
|
169
|
+
|
|
170
|
+
## Step 7 — Create and push tag
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
git tag -a "v$NEW_VERSION" -m "Release v$NEW_VERSION — $BUMP_TYPE bump
|
|
174
|
+
|
|
175
|
+
$(echo "$COMMITS" | sed 's/^/- /')"
|
|
176
|
+
|
|
177
|
+
git push origin "v$NEW_VERSION"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Important**: Push only the tag, not the branch. The workflows trigger on `v*` tag push.
|
|
181
|
+
- `publish-github-packages.yml` → publishes `@aryaniyaps/ultimate-pi` to GitHub Packages
|
|
182
|
+
- `publish-npm.yml` → publishes `ultimate-pi` to npm registry
|
|
183
|
+
|
|
184
|
+
Optionally also push the commit if user wants the branch updated:
|
|
185
|
+
```bash
|
|
186
|
+
git push origin $(git branch --show-current)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Ask user: "Push the version-bump commit to the current branch too? [Y/n]"
|
|
190
|
+
|
|
191
|
+
## Step 8 — Report
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
✓ Released v$NEW_VERSION ($BUMP_TYPE)
|
|
195
|
+
Tag: v$NEW_VERSION — pushed to origin
|
|
196
|
+
Workflows triggered:
|
|
197
|
+
- .github/workflows/publish-github-packages.yml
|
|
198
|
+
- .github/workflows/publish-npm.yml
|
|
199
|
+
Commit: $(git rev-parse --short HEAD)
|
|
200
|
+
Changelog: CHANGELOG.md updated
|
|
201
|
+
Monitor: https://github.com/aryaniyaps/ultimate-pi/actions
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Guard Rails
|
|
205
|
+
|
|
206
|
+
- **Clean tree required**: Block if uncommitted changes exist.
|
|
207
|
+
- **No duplicate tags**: Block if `v$NEW_VERSION` tag already exists locally or on remote.
|
|
208
|
+
- **No empty releases**: Block if no commits since last tag.
|
|
209
|
+
- **Valid semver only**: Block if current version doesn't parse as `X.Y.Z`.
|
|
210
|
+
- **Dry run safe**: `--dry-run` prints planned changes without modifying anything.
|
|
211
|
+
- **Manual workflow dispatch**: If workflows support `workflow_dispatch`, user can re-trigger manually from GitHub Actions UI if push fails.
|
|
212
|
+
- **Co-author idempotent**: Falls back to default pi-mono if `.pi/auto-commit.json` is missing.
|
|
213
|
+
|
|
214
|
+
## Error Handling
|
|
215
|
+
|
|
216
|
+
| Error | Action |
|
|
217
|
+
|-------|--------|
|
|
218
|
+
| No commits since last tag | Report, suggest making changes first. Stop. |
|
|
219
|
+
| Dirty working tree | Report dirty files. Suggest `git stash` or commit. Stop. |
|
|
220
|
+
| Tag already exists | Report conflict. User must delete old tag or bump differently. Stop. |
|
|
221
|
+
| No origin remote | Report. Suggest `git remote add origin <url>`. Stop. |
|
|
222
|
+
| Detached HEAD | Report. Suggest `git checkout main`. Stop. |
|
|
223
|
+
| Invalid semver | Report current version string. Stop. |
|
|
224
|
+
| npm pkg set fails | Check Node.js and npm version. Report error. Stop. |
|
|
225
|
+
| git push fails | Check auth. Report error. Suggest manual push. |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Harness CLI scripts
|
|
2
|
+
|
|
3
|
+
These scripts ship inside the `ultimate-pi` npm package under `.pi/scripts/`.
|
|
4
|
+
|
|
5
|
+
Pi's package manifest (`package.json` → `pi`) only loads **extensions**, **skills**, **prompts**, and **themes** — there is no `scripts` field. Harness scripts are invoked via:
|
|
6
|
+
|
|
7
|
+
- `npm run harness:*` (see root `package.json`)
|
|
8
|
+
- Extensions resolving paths with `resolveHarnessScript()` in `.pi/extensions/lib/harness-paths.ts`
|
|
9
|
+
|
|
10
|
+
| Script | npm script |
|
|
11
|
+
|--------|------------|
|
|
12
|
+
| `harness-graphify-bootstrap.sh` | `harness:graphify-bootstrap` |
|
|
13
|
+
| `harness-cli-verify.sh` | `harness:cli-verify` |
|
|
14
|
+
| `harness-verify.mjs` | `harness:verify` |
|
|
15
|
+
| `sentrux-rules-sync.mjs` | `harness:sentrux-sync` |
|
|
16
|
+
|
|
17
|
+
Repo-root `scripts/` (e.g. `regen_graphify_html.py`) is dev-only and excluded from the npm tarball via `.npmignore`.
|
|
@@ -9,7 +9,7 @@ import { join, dirname } from "node:path";
|
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
11
11
|
|
|
12
|
-
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
12
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
13
13
|
const SPECS = join(ROOT, ".pi", "harness", "specs");
|
|
14
14
|
const SMOKE = join(ROOT, ".pi", "harness", "evals", "smoke");
|
|
15
15
|
const ADRS = join(ROOT, ".pi", "harness", "docs", "adrs");
|
|
@@ -117,7 +117,7 @@ async function checkSentruxRules() {
|
|
|
117
117
|
}
|
|
118
118
|
ok("sentrux architecture.manifest.json");
|
|
119
119
|
|
|
120
|
-
const syncScript = join(ROOT, "scripts", "sentrux-rules-sync.mjs");
|
|
120
|
+
const syncScript = join(ROOT, ".pi", "scripts", "sentrux-rules-sync.mjs");
|
|
121
121
|
const { code: checkCode, out: checkOut } = await runNodeScript(syncScript, [
|
|
122
122
|
"--check",
|
|
123
123
|
]);
|
|
@@ -148,7 +148,7 @@ async function checkSentruxGate() {
|
|
|
148
148
|
ok("Sentrux stub present");
|
|
149
149
|
|
|
150
150
|
const { code, out } = await runNodeScript(
|
|
151
|
-
join(ROOT, "scripts", "sentrux-rules-sync.mjs"),
|
|
151
|
+
join(ROOT, ".pi", "scripts", "sentrux-rules-sync.mjs"),
|
|
152
152
|
["--force", "--strict"],
|
|
153
153
|
);
|
|
154
154
|
if (code === 127 || (out && out.includes("not installed"))) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Sync .sentrux/rules.toml from .pi/harness/sentrux/architecture.manifest.json.
|
|
4
4
|
* Preserves user content outside the harness managed block.
|
|
5
5
|
*
|
|
6
|
-
* Usage: node scripts/sentrux-rules-sync.mjs [--check] [--force]
|
|
6
|
+
* Usage: node .pi/scripts/sentrux-rules-sync.mjs [--check] [--force]
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { readFile, writeFile, mkdir, access } from "node:fs/promises";
|
|
@@ -13,7 +13,7 @@ import { fileURLToPath } from "node:url";
|
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { spawn } from "node:child_process";
|
|
15
15
|
|
|
16
|
-
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
16
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
17
17
|
const MANIFEST = join(
|
|
18
18
|
ROOT,
|
|
19
19
|
".pi",
|
package/.sentrux/rules.toml
CHANGED
|
@@ -41,9 +41,9 @@ order = 3
|
|
|
41
41
|
|
|
42
42
|
[[layers]]
|
|
43
43
|
name = "tooling"
|
|
44
|
-
paths = ["scripts/*", "test/*"]
|
|
44
|
+
paths = [".pi/scripts/*", "test/*"]
|
|
45
45
|
order = 4
|
|
46
|
-
#
|
|
46
|
+
# Harness CLI scripts and tests
|
|
47
47
|
|
|
48
48
|
[[boundaries]]
|
|
49
49
|
from = ".agents/skills/*"
|
|
@@ -66,7 +66,7 @@ to = ".pi/extensions/*"
|
|
|
66
66
|
reason = "Contracts are data-only JSON schemas; extensions implement behavior"
|
|
67
67
|
|
|
68
68
|
[[boundaries]]
|
|
69
|
-
from = "scripts/*"
|
|
69
|
+
from = ".pi/scripts/*"
|
|
70
70
|
to = ".agents/skills/*"
|
|
71
71
|
reason = "CLI scripts stay independent of skill markdown"
|
|
72
72
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v0.2.5] — 2026-05-15
|
|
6
|
+
|
|
7
|
+
### 🔧 Chores
|
|
8
|
+
|
|
9
|
+
- Move harness CLI scripts to `.pi/scripts/` (aligned with pi package layout; no `pi.scripts` manifest field)
|
|
10
|
+
- Point `npm run harness:*` and sentrux manifest at `.pi/scripts/`
|
|
11
|
+
- Exclude repo-root `scripts/` from npm publish (dev-only graphify helpers stay in checkout)
|
|
12
|
+
|
|
5
13
|
## [v0.2.4] — 2026-05-15
|
|
6
14
|
|
|
7
15
|
### 🐛 Fixes
|
package/firecrawl/.env
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# ===== Required ENVS ======
|
|
2
|
+
PORT=3002
|
|
3
|
+
HOST=0.0.0.0
|
|
4
|
+
USE_DB_AUTHENTICATION=false
|
|
5
|
+
|
|
6
|
+
# ===== Optional ENVS ======
|
|
7
|
+
# No OpenAI key - skipping AI features for now
|
|
8
|
+
# OPENAI_API_KEY=
|
|
9
|
+
|
|
10
|
+
# Experimental: Use Ollama
|
|
11
|
+
# OLLAMA_BASE_URL=http://localhost:11434/api
|
|
12
|
+
# MODEL_NAME=deepseek-r1:7b
|
|
13
|
+
# MODEL_EMBEDDING_NAME=nomic-embed-text
|
|
14
|
+
|
|
15
|
+
# Experimental: Use any OpenAI-compatible API
|
|
16
|
+
# OPENAI_BASE_URL=https://example.com/v1
|
|
17
|
+
# OPENAI_API_KEY=
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## === Proxy ===
|
|
21
|
+
# PROXY_SERVER can be a full URL (e.g. http://0.1.2.3:1234) or just an IP and port combo (e.g. 0.1.2.3:1234)
|
|
22
|
+
# Do not uncomment PROXY_USERNAME and PROXY_PASSWORD if your proxy is unauthenticated
|
|
23
|
+
# PROXY_SERVER=
|
|
24
|
+
# PROXY_USERNAME=
|
|
25
|
+
# PROXY_PASSWORD=
|
|
26
|
+
|
|
27
|
+
## === /search API ===
|
|
28
|
+
# SearXNG instance running alongside Firecrawl in docker-compose
|
|
29
|
+
SEARXNG_ENDPOINT=http://searxng:8080
|
|
30
|
+
# You can also customize the engines and categories parameters, but the defaults should also work just fine.
|
|
31
|
+
# SEARXNG_ENGINES=
|
|
32
|
+
# SEARXNG_CATEGORIES=
|
|
33
|
+
|
|
34
|
+
# Supabase not configured (self-hosted doesn't support it yet)
|
|
35
|
+
# SUPABASE_ANON_TOKEN=
|
|
36
|
+
# SUPABASE_URL=
|
|
37
|
+
# SUPABASE_SERVICE_TOKEN=
|
|
38
|
+
|
|
39
|
+
# Set if you'd like to send posthog events like job logs
|
|
40
|
+
POSTHOG_API_KEY="phc_O0BBrJ4z9O9h0aoydmZSS1oOPY5ARKKcILbybCL9DWs"
|
|
41
|
+
POSTHOG_HOST="https://us.i.posthog.com"
|
|
42
|
+
|
|
43
|
+
# Change this for security in production
|
|
44
|
+
BULL_AUTH_KEY=CHANGEME
|
|
45
|
+
|
|
46
|
+
# PostgreSQL
|
|
47
|
+
POSTGRES_USER=postgres
|
|
48
|
+
POSTGRES_PASSWORD=postgres
|
|
49
|
+
POSTGRES_DB=postgres
|
|
50
|
+
|
|
51
|
+
# Auto-configured by docker-compose
|
|
52
|
+
# REDIS_URL=redis://redis:6379
|
|
53
|
+
# PLAYWRIGHT_MICROSERVICE_URL=http://playwright-service:3000/scrape
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultimate-pi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Ultimate AI coding harness for pi.dev — extensible skills, Obsidian wiki knowledge layer, compressed context, deterministic output",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -34,12 +34,22 @@
|
|
|
34
34
|
"./.pi/prompts"
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
|
+
"files": [
|
|
38
|
+
".agents",
|
|
39
|
+
".pi",
|
|
40
|
+
".sentrux",
|
|
41
|
+
"firecrawl",
|
|
42
|
+
"AGENTS.md",
|
|
43
|
+
"biome.json",
|
|
44
|
+
"CHANGELOG.md",
|
|
45
|
+
"README.md"
|
|
46
|
+
],
|
|
37
47
|
"scripts": {
|
|
38
48
|
"check:ts": "tsc --noEmit --target ES2022 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/model-router-bootstrap.ts .pi/extensions/harness-telemetry.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts",
|
|
39
|
-
"harness:graphify-bootstrap": "bash scripts/harness-graphify-bootstrap.sh",
|
|
40
|
-
"harness:cli-verify": "bash scripts/harness-cli-verify.sh",
|
|
41
|
-
"harness:verify": "node scripts/harness-verify.mjs",
|
|
42
|
-
"harness:sentrux-sync": "node scripts/sentrux-rules-sync.mjs --force",
|
|
49
|
+
"harness:graphify-bootstrap": "bash .pi/scripts/harness-graphify-bootstrap.sh",
|
|
50
|
+
"harness:cli-verify": "bash .pi/scripts/harness-cli-verify.sh",
|
|
51
|
+
"harness:verify": "node .pi/scripts/harness-verify.mjs",
|
|
52
|
+
"harness:sentrux-sync": "node .pi/scripts/sentrux-rules-sync.mjs --force",
|
|
43
53
|
"harness:meta-optimizer": "node .pi/harness/evolution/meta-optimizer.mjs",
|
|
44
54
|
"lint": "biome check",
|
|
45
55
|
"lint:fix": "biome check --fix",
|
package/.ckignore
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# .ckignore
|
|
2
|
-
|
|
3
|
-
# Build artifacts (not useful for understanding code)
|
|
4
|
-
target/
|
|
5
|
-
dist/
|
|
6
|
-
build/
|
|
7
|
-
*.o
|
|
8
|
-
*.so
|
|
9
|
-
*.dylib
|
|
10
|
-
|
|
11
|
-
# Dependencies (too large, low signal)
|
|
12
|
-
node_modules/
|
|
13
|
-
vendor/
|
|
14
|
-
venv/
|
|
15
|
-
.venv/
|
|
16
|
-
|
|
17
|
-
# Media files (not code)
|
|
18
|
-
*.png
|
|
19
|
-
*.jpg
|
|
20
|
-
*.gif
|
|
21
|
-
*.mp4
|
|
22
|
-
*.pdf
|
|
23
|
-
|
|
24
|
-
<!-- # Large data files
|
|
25
|
-
*.csv
|
|
26
|
-
*.json
|
|
27
|
-
*.xml
|
|
28
|
-
*.log -->
|
|
29
|
-
|
|
30
|
-
# Test fixtures (unless you search them)
|
|
31
|
-
fixtures/
|
|
32
|
-
__snapshots__/
|
|
33
|
-
*.snap
|
|
34
|
-
|
|
35
|
-
<!-- # Generated code (if not relevant)
|
|
36
|
-
*_pb2.py
|
|
37
|
-
*.generated.*
|
|
38
|
-
|
|
39
|
-
# Documentation (include if you want AI to reference docs)
|
|
40
|
-
# docs/
|
|
41
|
-
# *.md -->
|
package/.codex/hooks.json
DELETED
package/.env.example
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
POSTHOG_PERSONAL_API_KEY="phx_your_personal_api_key"
|
|
2
|
-
POSTHOG_API_KEY="phc_your_project_key"
|
|
3
|
-
# narrow the tool surface
|
|
4
|
-
POSTHOG_MCP_FEATURES="llm_analytics"
|
|
5
|
-
POSTHOG_PROJECT_NAME="ultimate-pi"
|
|
6
|
-
POSTHOG_PRIVACY_MODE="false"
|
|
7
|
-
# Harness domain events (harness-telemetry.ts); set false to disable harness_* only
|
|
8
|
-
HARNESS_TELEMETRY_ENABLED="true"
|
|
9
|
-
# Optional: require Sentrux stub for npm run harness:verify
|
|
10
|
-
# HARNESS_SENTRUX_REQUIRED="true"
|
|
11
|
-
FIRECRAWL_API_KEY="fc_your_firecrawl_api_key"
|
|
12
|
-
FIRECRAWL_API_URL="http://localhost:3002"
|
|
13
|
-
# FIRECRAWL_NO_TELEMETRY=0
|
|
14
|
-
VAULT_WIKI_PATH="vault/wiki"
|
|
15
|
-
CURSOR_API_KEY=""
|
|
16
|
-
PI_VCC_CONFIG_PATH=".pi/pi-vcc-config.json"
|
|
17
|
-
# VCC config: points to project-level pi-vcc config (overrideDefaultCompaction, debug)
|
|
18
|
-
|
|
19
|
-
# graphify headless extract
|
|
20
|
-
OPENAI_API_KEY="sk-your_openai_api_key"
|
|
21
|
-
OPENAI_API_BASE="https://opencode.ai/zen/go/v1"
|
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
data/books/**/*.pdf filter=lfs diff=lfs merge=lfs -text
|
package/.github/banner-v2.png
DELETED
|
Binary file
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: Lint and Format
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
- master
|
|
8
|
-
pull_request:
|
|
9
|
-
branches:
|
|
10
|
-
- main
|
|
11
|
-
- master
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
lint:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout repository
|
|
18
|
-
uses: actions/checkout@v4
|
|
19
|
-
|
|
20
|
-
- name: Setup Node.js
|
|
21
|
-
uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: 22
|
|
24
|
-
cache: "npm"
|
|
25
|
-
|
|
26
|
-
- name: Install dependencies
|
|
27
|
-
run: npm ci
|
|
28
|
-
|
|
29
|
-
- name: Run Biome check (Lint & Format)
|
|
30
|
-
run: npm run lint
|
|
31
|
-
|
|
32
|
-
- name: Run TypeScript check
|
|
33
|
-
run: npm run check:ts
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
name: Publish to GitHub Packages
|
|
2
|
-
run-name: Publish GitHub package from ${{ github.ref_name }}
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
tags:
|
|
7
|
-
- 'v*'
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
publish-github-packages:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
packages: write
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout
|
|
18
|
-
uses: actions/checkout@v4
|
|
19
|
-
|
|
20
|
-
- name: Setup Node.js for GitHub Packages
|
|
21
|
-
uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: '22.14.0'
|
|
24
|
-
registry-url: 'https://npm.pkg.github.com'
|
|
25
|
-
scope: '@aryaniyaps'
|
|
26
|
-
|
|
27
|
-
- name: Prepare scoped package manifest for GitHub Packages
|
|
28
|
-
run: |
|
|
29
|
-
npm pkg set name='@aryaniyaps/ultimate-pi'
|
|
30
|
-
npm pkg set publishConfig.registry='https://npm.pkg.github.com'
|
|
31
|
-
|
|
32
|
-
- name: Publish package to GitHub Packages
|
|
33
|
-
run: npm publish --ignore-scripts
|
|
34
|
-
env:
|
|
35
|
-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|