ultimate-pi 0.2.3 → 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/custom-header.ts +26 -2
- package/.pi/extensions/lib/harness-paths.ts +55 -0
- package/.pi/extensions/model-router-bootstrap.ts +174 -0
- package/.pi/extensions/sentrux-rules-sync.ts +28 -3
- package/.pi/harness/browser.json +5 -0
- 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.example.json +27 -0
- package/.pi/prompts/graphify.md +4 -8
- package/.pi/prompts/harness-setup.md +142 -92
- package/.pi/prompts/release.md +225 -0
- package/.pi/scripts/README.md +17 -0
- package/.pi/scripts/harness-cli-verify.sh +294 -0
- package/.pi/scripts/harness-graphify-bootstrap.sh +151 -0
- package/{scripts → .pi/scripts}/harness-verify.mjs +3 -3
- package/{scripts → .pi/scripts}/sentrux-rules-sync.mjs +2 -2
- package/.pi/settings.json +0 -2
- package/.sentrux/.harness-rules-meta.json +2 -2
- package/.sentrux/rules.toml +3 -3
- package/AGENTS.md +12 -0
- package/CHANGELOG.md +21 -0
- package/README.md +39 -350
- package/firecrawl/.env +53 -0
- package/package.json +16 -4
- package/.ckignore +0 -41
- 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/.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/.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 }}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: Publish to npm
|
|
2
|
-
run-name: Publish npm from ${{ github.ref_name }}
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
tags:
|
|
7
|
-
- 'v*'
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
publish:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
id-token: write
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout
|
|
18
|
-
uses: actions/checkout@v4
|
|
19
|
-
|
|
20
|
-
- name: Setup Node.js
|
|
21
|
-
uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: '22.14.0'
|
|
24
|
-
|
|
25
|
-
- name: Ensure npm trusted publishing minimum version
|
|
26
|
-
run: |
|
|
27
|
-
npm i -g npm@^11.5.1
|
|
28
|
-
node -v
|
|
29
|
-
npm -v
|
|
30
|
-
|
|
31
|
-
- name: Publish package
|
|
32
|
-
run: npm publish --provenance --access public --ignore-scripts
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# Contributing to ultimate-pi
|
|
2
|
-
|
|
3
|
-
## Local development setup
|
|
4
|
-
|
|
5
|
-
1. Clone and install dependencies:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
git clone https://github.com/aryaniyaps/ultimate-pi.git
|
|
9
|
-
cd ultimate-pi
|
|
10
|
-
npm install
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
`npm install` automatically sets up pre-commit hooks via [Lefthook](https://github.com/evilmartians/lefthook).
|
|
14
|
-
|
|
15
|
-
2. Install the package locally into PI:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
pi install . -l
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Then restart PI or run `/reload`.
|
|
22
|
-
|
|
23
|
-
## Linting & formatting
|
|
24
|
-
|
|
25
|
-
Uses [Biome](https://biomejs.dev) for linting, formatting, and import sorting.
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm run lint # check lint + format errors
|
|
29
|
-
npm run lint:fix # auto-fix lint + format errors
|
|
30
|
-
npm run format # format all files
|
|
31
|
-
npm run format:check # check formatting without writing
|
|
32
|
-
npm run check:ts # typecheck extensions
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Pre-commit hooks run `biome check` and `tsc` on staged files automatically.
|
|
36
|
-
|
|
37
|
-
## Sentrux (architectural quality gate)
|
|
38
|
-
|
|
39
|
-
[Sentrux](https://github.com/sentrux/sentrux) provides real-time structural quality metrics for AI-agent-written code. It acts as a feedback loop sensor — scanning codebase architecture, detecting degradation, and enforcing rules via MCP.
|
|
40
|
-
|
|
41
|
-
### Quick start
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Install (macOS / Linux / Windows)
|
|
45
|
-
curl -fsSL https://raw.githubusercontent.com/sentrux/sentrux/main/install.sh | sh
|
|
46
|
-
|
|
47
|
-
# Install all 52 language plugins
|
|
48
|
-
sentrux plugin add-standard
|
|
49
|
-
|
|
50
|
-
# Run a quality scan
|
|
51
|
-
sentrux check .
|
|
52
|
-
|
|
53
|
-
# Save baseline before agent session
|
|
54
|
-
sentrux gate --save .
|
|
55
|
-
|
|
56
|
-
# Compare after — catches degradation
|
|
57
|
-
sentrux gate .
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### MCP Integration
|
|
61
|
-
|
|
62
|
-
The sentrux MCP server is configured in `.pi/mcp.json`. Agents can use tools like `scan`, `session_start`, `session_end`, `check_rules`, `health`, and `evolution` to monitor code quality during development.
|
|
63
|
-
|
|
64
|
-
### Rules Engine
|
|
65
|
-
|
|
66
|
-
Create `.sentrux/rules.toml` to define architectural constraints:
|
|
67
|
-
|
|
68
|
-
```toml
|
|
69
|
-
[constraints]
|
|
70
|
-
max_cycles = 0
|
|
71
|
-
max_coupling = "B"
|
|
72
|
-
max_cc = 25
|
|
73
|
-
no_god_files = true
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Firecrawl (self-hosted web scraping)
|
|
77
|
-
|
|
78
|
-
The Firecrawl skill depends on a Firecrawl instance. This repo includes a self-hosted setup powered by Docker.
|
|
79
|
-
|
|
80
|
-
### Quick start
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
cd firecrawl
|
|
84
|
-
cp .env.template .env # first time only — edit if needed
|
|
85
|
-
docker compose up -d # pulls pre-built GHCR images automatically
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Firecrawl API is now at `http://localhost:3002`. Admin UI at `http://localhost:3002/admin/<BULL_AUTH_KEY>/queues`.
|
|
89
|
-
|
|
90
|
-
### Services
|
|
91
|
-
|
|
92
|
-
| Service | Image | Port |
|
|
93
|
-
|---------|-------|------|
|
|
94
|
-
| `api` | `ghcr.io/firecrawl/firecrawl` | 3002 |
|
|
95
|
-
| `playwright-service` | `ghcr.io/firecrawl/playwright-service:latest` | 3000 (internal) |
|
|
96
|
-
| `nuq-postgres` | `ghcr.io/firecrawl/nuq-postgres:latest` | 5432 (internal) |
|
|
97
|
-
| `redis` | `redis:alpine` | 6379 (internal) |
|
|
98
|
-
| `rabbitmq` | `rabbitmq:3-management` | 5672 (internal) |
|
|
99
|
-
| `searxng` | `searxng/searxng:latest` | 8080 |
|
|
100
|
-
|
|
101
|
-
### Configuration
|
|
102
|
-
|
|
103
|
-
All options live in `firecrawl/.env`. See `firecrawl/.env.template` for the full reference. Key env vars:
|
|
104
|
-
|
|
105
|
-
- `PORT` — API port (default: `3002`)
|
|
106
|
-
- `SEARXNG_ENDPOINT` — enables `/search` API (default: `http://searxng:8080`)
|
|
107
|
-
- `OPENAI_API_KEY` — enables AI features (JSON formatting, `/extract` API)
|
|
108
|
-
- `BULL_AUTH_KEY` — admin UI access key (default: `CHANGEME` — change in production)
|
|
109
|
-
|
|
110
|
-
See `firecrawl/README.md` for detailed docs and SDK usage examples.
|
|
111
|
-
|
|
112
|
-
## Extensions
|
|
113
|
-
|
|
114
|
-
### Dotenv loader
|
|
115
|
-
|
|
116
|
-
`.pi/extensions/dotenv-loader.ts` — loads `.env` files into `process.env` on session start.
|
|
117
|
-
|
|
118
|
-
Configurable via env vars (set before launching pi):
|
|
119
|
-
|
|
120
|
-
| Variable | Default | Description |
|
|
121
|
-
|---|---|---|
|
|
122
|
-
| `ENV_LOADER_FILES` | `.env` | Comma-separated list of `.env` file paths (relative to cwd). |
|
|
123
|
-
| `ENV_LOADER_OVERRIDE` | `false` | Set to `true` to overwrite existing env vars. |
|
|
124
|
-
| `ENV_LOADER_SILENT` | `false` | Set to `true` to suppress startup logs. |
|
|
125
|
-
| `ENV_LOADER_ENCODING` | `utf-8` | File encoding for `.env` files. |
|
|
126
|
-
|
|
127
|
-
- Supports variable expansion (`$VAR` and `${VAR}`).
|
|
128
|
-
- Reloads on `/reload`.
|
|
129
|
-
- Status command: `/env-loader-status`
|
|
130
|
-
|
|
131
|
-
### Harness governance extensions
|
|
132
|
-
|
|
133
|
-
These Pi extensions are loaded from `.pi/extensions/` via the root `package.json`
|
|
134
|
-
`pi.extensions` manifest (no extra registration needed):
|
|
135
|
-
|
|
136
|
-
- `.pi/extensions/policy-gate.ts` — plan-before-mutate + phase enforcement
|
|
137
|
-
- `.pi/extensions/budget-guard.ts` — budget hard-stop and `budget_exhausted` events
|
|
138
|
-
- `.pi/extensions/trace-recorder.ts` — run trace artifacts in `.pi/harness/runs/`
|
|
139
|
-
- `.pi/extensions/review-integrity.ts` — evaluator/adversary session isolation checks
|
|
140
|
-
- `.pi/extensions/test-diff-integrity.ts` — suspicious test diff detection/escalation
|
|
141
|
-
- `.pi/extensions/debate-orchestrator.ts` — headless debate bus + consensus packets
|
|
142
|
-
|
|
143
|
-
### PostHog analytics
|
|
144
|
-
|
|
145
|
-
`@posthog/pi` — wraps the upstream [posthog-pi](https://github.com/PostHog/posthog-pi) extension to capture AI generation spans, tool spans, and traces in [PostHog](https://posthog.com). Install via `pi install @posthog/pi`. See the upstream repo for configuration and env vars.
|
|
146
|
-
|
|
147
|
-
## Skill sources
|
|
148
|
-
|
|
149
|
-
| Skill | Upstream |
|
|
150
|
-
|---|---|
|
|
151
|
-
| caveman | [juliusbrussee/caveman](https://github.com/juliusbrussee/caveman) |
|
|
152
|
-
| context7-cli | [upstash/context7](https://github.com/upstash/context7) |
|
|
153
|
-
| find-skills | bundled (context7-compatible discovery) |
|
|
154
|
-
| firecrawl (13 skills) | [firecrawl](https://firecrawl.dev) |
|
|
155
|
-
| obsidian/wiki skills (11 skills) | [AgriciDaniel/claude-obsidian](https://github.com/AgriciDaniel/claude-obsidian) |
|
|
156
|
-
| posthog-analyst | bundled (PostHog MCP integration) |
|
|
157
|
-
|
|
158
|
-
### Firecrawl sub-skills
|
|
159
|
-
|
|
160
|
-
`firecrawl-search`, `firecrawl-scrape`, `firecrawl-crawl`, `firecrawl-map`, `firecrawl-download`, `firecrawl-parse`, `firecrawl-interact`, `firecrawl-agent`, `firecrawl-build-scrape`, `firecrawl-build-search`, `firecrawl-build-onboarding`, `firecrawl-build-interact`
|
|
161
|
-
|
|
162
|
-
### Wiki sub-skills
|
|
163
|
-
|
|
164
|
-
`wiki`, `wiki-save`, `wiki-query`, `wiki-ingest`, `wiki-lint`, `wiki-fold`, `autoresearch`, `canvas`, `obsidian-markdown`, `obsidian-bases`
|
|
165
|
-
|
|
166
|
-
> `context-mode` is installed as a separate pi package (`npm:context-mode`) — not bundled as a skill.
|
package/lefthook.yml
DELETED
|
Binary file
|