ultimate-pi 0.3.1 → 0.4.1
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/.agents/skills/harness-decisions/SKILL.md +37 -0
- package/.agents/skills/harness-governor/SKILL.md +1 -1
- package/.agents/skills/harness-orchestration/SKILL.md +54 -0
- package/.agents/skills/harness-plan/SKILL.md +4 -3
- package/.agents/skills/harness-sentrux-setup/SKILL.md +57 -0
- package/.agents/skills/scrapling-web/SKILL.md +93 -0
- package/.pi/PACKAGING.md +1 -0
- package/.pi/SYSTEM.md +13 -15
- package/.pi/agents/harness/adversary.md +3 -0
- package/.pi/agents/harness/evaluator.md +3 -0
- package/.pi/agents/harness/executor.md +4 -1
- package/.pi/agents/harness/meta-optimizer.md +2 -1
- package/.pi/agents/harness/planner.md +22 -1
- package/.pi/agents/harness/sentrux-bootstrap.md +42 -0
- package/.pi/agents/harness/tie-breaker.md +2 -0
- package/.pi/extensions/harness-ask-user.ts +74 -0
- package/.pi/extensions/harness-subagents.ts +9 -0
- package/.pi/extensions/lib/ask-user/dialog.ts +260 -0
- package/.pi/extensions/lib/ask-user/fallback.ts +78 -0
- package/.pi/extensions/lib/ask-user/render.ts +66 -0
- package/.pi/extensions/lib/ask-user/schema.ts +69 -0
- package/.pi/extensions/lib/ask-user/types.ts +41 -0
- package/.pi/extensions/lib/ask-user/validate-core.mjs +79 -0
- package/.pi/extensions/lib/ask-user/validate.ts +92 -0
- package/.pi/extensions/lib/harness-subagents/agent-loader.ts +126 -0
- package/.pi/extensions/lib/harness-subagents/agent-manifest.ts +119 -0
- package/.pi/extensions/lib/harness-subagents/agent-parser.ts +87 -0
- package/.pi/extensions/lib/harness-subagents/blackboard-tool.ts +118 -0
- package/.pi/extensions/lib/harness-subagents/blackboard.ts +175 -0
- package/.pi/extensions/lib/harness-subagents/spawn-policy.ts +27 -0
- package/.pi/extensions/lib/harness-subagents/types-blackboard.ts +27 -0
- package/.pi/extensions/lib/harness-subagents/vendored/agent-manager.ts +553 -0
- package/.pi/extensions/lib/harness-subagents/vendored/agent-runner.ts +637 -0
- package/.pi/extensions/lib/harness-subagents/vendored/agent-types.ts +175 -0
- package/.pi/extensions/lib/harness-subagents/vendored/context.ts +59 -0
- package/.pi/extensions/lib/harness-subagents/vendored/cross-extension-rpc.ts +134 -0
- package/.pi/extensions/lib/harness-subagents/vendored/custom-agents.ts +5 -0
- package/.pi/extensions/lib/harness-subagents/vendored/default-agents.ts +123 -0
- package/.pi/extensions/lib/harness-subagents/vendored/env.ts +43 -0
- package/.pi/extensions/lib/harness-subagents/vendored/group-join.ts +144 -0
- package/.pi/extensions/lib/harness-subagents/vendored/index.ts +2447 -0
- package/.pi/extensions/lib/harness-subagents/vendored/invocation-config.ts +52 -0
- package/.pi/extensions/lib/harness-subagents/vendored/memory.ts +182 -0
- package/.pi/extensions/lib/harness-subagents/vendored/model-resolver.ts +92 -0
- package/.pi/extensions/lib/harness-subagents/vendored/output-file.ts +115 -0
- package/.pi/extensions/lib/harness-subagents/vendored/prompts.ts +103 -0
- package/.pi/extensions/lib/harness-subagents/vendored/schedule-store.ts +177 -0
- package/.pi/extensions/lib/harness-subagents/vendored/schedule.ts +416 -0
- package/.pi/extensions/lib/harness-subagents/vendored/settings.ts +210 -0
- package/.pi/extensions/lib/harness-subagents/vendored/skill-loader.ts +108 -0
- package/.pi/extensions/lib/harness-subagents/vendored/types.ts +187 -0
- package/.pi/extensions/lib/harness-subagents/vendored/ui/agent-widget.ts +637 -0
- package/.pi/extensions/lib/harness-subagents/vendored/ui/conversation-viewer.ts +324 -0
- package/.pi/extensions/lib/harness-subagents/vendored/ui/schedule-menu.ts +110 -0
- package/.pi/extensions/lib/harness-subagents/vendored/usage.ts +71 -0
- package/.pi/extensions/lib/harness-subagents/vendored/worktree.ts +195 -0
- package/.pi/extensions/lib/harness-vcc-settings.ts +50 -0
- package/.pi/extensions/ultimate-pi-vcc.ts +17 -0
- package/.pi/harness/README.md +2 -1
- package/.pi/harness/agents.manifest.json +80 -0
- package/.pi/harness/docs/adrs/0009-sentrux-rules-lifecycle.md +9 -5
- package/.pi/harness/docs/adrs/0030-inhouse-vcc-compaction.md +40 -0
- package/.pi/harness/docs/adrs/README.md +1 -0
- package/.pi/harness/env.harness.template +28 -0
- package/.pi/harness/sentrux/architecture.manifest.json +6 -1
- package/.pi/prompts/harness-auto.md +2 -2
- package/.pi/prompts/harness-plan.md +2 -2
- package/.pi/prompts/harness-router-tune.md +2 -2
- package/.pi/prompts/harness-run.md +1 -0
- package/.pi/prompts/harness-setup.md +179 -340
- package/.pi/scripts/README.md +6 -1
- package/.pi/scripts/harness-agents-manifest.mjs +123 -0
- package/.pi/scripts/harness-cli-verify.sh +60 -11
- package/.pi/scripts/harness-generate-model-router.mjs +242 -0
- package/.pi/scripts/harness-graphify-bootstrap.sh +1 -6
- package/.pi/scripts/harness-resolve-up-pkg.mjs +71 -0
- package/.pi/scripts/harness-seed-project-contracts.mjs +33 -1
- package/.pi/scripts/harness-sentrux-bootstrap.mjs +146 -0
- package/.pi/scripts/harness-sync-env.mjs +148 -0
- package/.pi/scripts/harness-verify.mjs +19 -0
- package/.pi/scripts/harness-web-search.md +33 -0
- package/.pi/scripts/harness-web.py +177 -0
- package/.pi/scripts/harness_web/__init__.py +1 -0
- package/.pi/scripts/harness_web/config.py +80 -0
- package/.pi/scripts/harness_web/output.py +55 -0
- package/.pi/scripts/harness_web/scrape.py +120 -0
- package/.pi/scripts/harness_web/search_ddg.py +106 -0
- package/.pi/scripts/release.sh +338 -0
- package/.pi/scripts/sentrux-rules-sync.mjs +29 -7
- package/.pi/scripts/vendor-pi-vcc-settings.stub.ts +8 -0
- package/.pi/scripts/vendor-sync-pi-vcc.sh +40 -0
- package/.pi/settings.example.json +1 -7
- package/.sentrux/rules.toml +1 -1
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +14 -0
- package/THIRD_PARTY_NOTICES.md +8 -0
- package/package.json +16 -12
- package/vendor/pi-vcc/README.md +215 -0
- package/vendor/pi-vcc/UPSTREAM_PIN.md +12 -0
- package/vendor/pi-vcc/demo.gif +0 -0
- package/vendor/pi-vcc/index.ts +12 -0
- package/vendor/pi-vcc/package.json +26 -0
- package/vendor/pi-vcc/scripts/audit-sessions.ts +88 -0
- package/vendor/pi-vcc/scripts/benchmark-real-sessions.ts +25 -0
- package/vendor/pi-vcc/scripts/compare-before-after.ts +36 -0
- package/vendor/pi-vcc/scripts/dump-branch-output.ts +20 -0
- package/vendor/pi-vcc/src/commands/pi-vcc.ts +36 -0
- package/vendor/pi-vcc/src/commands/vcc-recall.ts +65 -0
- package/vendor/pi-vcc/src/core/brief.ts +381 -0
- package/vendor/pi-vcc/src/core/build-sections.ts +79 -0
- package/vendor/pi-vcc/src/core/content.ts +60 -0
- package/vendor/pi-vcc/src/core/filter-noise.ts +42 -0
- package/vendor/pi-vcc/src/core/format-recall.ts +27 -0
- package/vendor/pi-vcc/src/core/format.ts +49 -0
- package/vendor/pi-vcc/src/core/lineage.ts +26 -0
- package/vendor/pi-vcc/src/core/load-messages.ts +41 -0
- package/vendor/pi-vcc/src/core/normalize.ts +66 -0
- package/vendor/pi-vcc/src/core/recall-scope.ts +14 -0
- package/vendor/pi-vcc/src/core/render-entries.ts +55 -0
- package/vendor/pi-vcc/src/core/report.ts +237 -0
- package/vendor/pi-vcc/src/core/sanitize.ts +5 -0
- package/vendor/pi-vcc/src/core/search-entries.ts +221 -0
- package/vendor/pi-vcc/src/core/settings.ts +8 -0
- package/vendor/pi-vcc/src/core/skill-collapse.ts +35 -0
- package/vendor/pi-vcc/src/core/summarize.ts +157 -0
- package/vendor/pi-vcc/src/core/tool-args.ts +14 -0
- package/vendor/pi-vcc/src/details.ts +7 -0
- package/vendor/pi-vcc/src/extract/commits.ts +69 -0
- package/vendor/pi-vcc/src/extract/files.ts +80 -0
- package/vendor/pi-vcc/src/extract/goals.ts +79 -0
- package/vendor/pi-vcc/src/extract/preferences.ts +55 -0
- package/vendor/pi-vcc/src/hooks/before-compact.ts +314 -0
- package/vendor/pi-vcc/src/sections.ts +12 -0
- package/vendor/pi-vcc/src/tools/recall.ts +109 -0
- package/vendor/pi-vcc/src/types.ts +14 -0
- package/vendor/pi-vcc/tests/before-compact-hook.test.ts +204 -0
- package/vendor/pi-vcc/tests/before-compact.test.ts +145 -0
- package/vendor/pi-vcc/tests/brief.test.ts +206 -0
- package/vendor/pi-vcc/tests/build-sections.test.ts +59 -0
- package/vendor/pi-vcc/tests/compile.test.ts +80 -0
- package/vendor/pi-vcc/tests/content.test.ts +31 -0
- package/vendor/pi-vcc/tests/extract-goals.test.ts +86 -0
- package/vendor/pi-vcc/tests/extract-preferences.test.ts +30 -0
- package/vendor/pi-vcc/tests/filter-noise.test.ts +61 -0
- package/vendor/pi-vcc/tests/fixtures.ts +61 -0
- package/vendor/pi-vcc/tests/format-recall.test.ts +30 -0
- package/vendor/pi-vcc/tests/format.test.ts +62 -0
- package/vendor/pi-vcc/tests/lineage.test.ts +33 -0
- package/vendor/pi-vcc/tests/load-messages.test.ts +51 -0
- package/vendor/pi-vcc/tests/normalize.test.ts +97 -0
- package/vendor/pi-vcc/tests/real-sessions.test.ts +38 -0
- package/vendor/pi-vcc/tests/recall-expand.test.ts +15 -0
- package/vendor/pi-vcc/tests/recall-scope.test.ts +32 -0
- package/vendor/pi-vcc/tests/recall-tool-scope.test.ts +67 -0
- package/vendor/pi-vcc/tests/render-entries.test.ts +62 -0
- package/vendor/pi-vcc/tests/report.test.ts +44 -0
- package/vendor/pi-vcc/tests/sanitize.test.ts +24 -0
- package/vendor/pi-vcc/tests/search-entries.test.ts +144 -0
- package/vendor/pi-vcc/tests/support/load-session.ts +23 -0
- package/vendor/pi-vcc/tests/support/real-sessions.ts +51 -0
- package/.agents/skills/firecrawl/SKILL.md +0 -150
- package/.agents/skills/firecrawl/rules/install.md +0 -82
- package/.agents/skills/firecrawl/rules/security.md +0 -26
- package/.agents/skills/firecrawl-agent/SKILL.md +0 -57
- package/.agents/skills/firecrawl-build-interact/SKILL.md +0 -67
- package/.agents/skills/firecrawl-build-onboarding/SKILL.md +0 -102
- package/.agents/skills/firecrawl-build-onboarding/references/auth-flow.md +0 -39
- package/.agents/skills/firecrawl-build-onboarding/references/project-setup.md +0 -20
- package/.agents/skills/firecrawl-build-onboarding/references/sdk-installation.md +0 -17
- package/.agents/skills/firecrawl-build-scrape/SKILL.md +0 -68
- package/.agents/skills/firecrawl-build-search/SKILL.md +0 -68
- package/.agents/skills/firecrawl-crawl/SKILL.md +0 -58
- package/.agents/skills/firecrawl-download/SKILL.md +0 -69
- package/.agents/skills/firecrawl-interact/SKILL.md +0 -83
- package/.agents/skills/firecrawl-map/SKILL.md +0 -50
- package/.agents/skills/firecrawl-parse/SKILL.md +0 -61
- package/.agents/skills/firecrawl-scrape/SKILL.md +0 -68
- package/.agents/skills/firecrawl-search/SKILL.md +0 -59
- package/.pi/pi-vcc-config.json +0 -4
- package/firecrawl/.env.template +0 -62
- package/firecrawl/README.md +0 -49
- package/firecrawl/docker-compose.yaml +0 -201
- package/firecrawl/searxng/searxng.env +0 -3
- package/firecrawl/searxng/settings.yml +0 -85
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ultimate-pi VCC configuration — env only (no config files).
|
|
3
|
+
*
|
|
4
|
+
* @see https://github.com/sting8k/pi-vcc (vendored algorithm)
|
|
5
|
+
* @see https://github.com/lllyasviel/VCC
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface PiVccSettings {
|
|
9
|
+
/** When true, VCC handles /compact, auto-threshold, and overflow compaction. */
|
|
10
|
+
overrideDefaultCompaction: boolean;
|
|
11
|
+
/** Write debug snapshot to /tmp/pi-vcc-debug.json on each compaction. */
|
|
12
|
+
debug: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const FALSE_VALUES = new Set(["false", "0", "off", "no"]);
|
|
16
|
+
const TRUE_VALUES = new Set(["true", "1", "on", "yes"]);
|
|
17
|
+
|
|
18
|
+
function parseHarnessBool(envName: string, defaultValue: boolean): boolean {
|
|
19
|
+
const raw = process.env[envName]?.trim().toLowerCase();
|
|
20
|
+
if (!raw) {
|
|
21
|
+
return defaultValue;
|
|
22
|
+
}
|
|
23
|
+
if (FALSE_VALUES.has(raw)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if (TRUE_VALUES.has(raw)) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return defaultValue;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Whether VCC overrides Pi built-in LLM compaction (default: true). */
|
|
33
|
+
export function resolveOverrideDefaultCompaction(): boolean {
|
|
34
|
+
return parseHarnessBool("HARNESS_VCC_COMPACTION", true);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Compaction debug snapshots (default: false). */
|
|
38
|
+
export function resolveVccDebug(): boolean {
|
|
39
|
+
return parseHarnessBool("HARNESS_VCC_DEBUG", false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function loadSettings(): PiVccSettings {
|
|
43
|
+
return {
|
|
44
|
+
overrideDefaultCompaction: resolveOverrideDefaultCompaction(),
|
|
45
|
+
debug: resolveVccDebug(),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** No-op — harness VCC does not scaffold or read JSON config files. */
|
|
50
|
+
export function scaffoldSettings(): void {}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-house VCC compaction for ultimate-pi.
|
|
3
|
+
*
|
|
4
|
+
* Vendored compaction core from [pi-vcc](https://github.com/sting8k/pi-vcc),
|
|
5
|
+
* inspired by [VCC](https://github.com/lllyasviel/VCC).
|
|
6
|
+
*
|
|
7
|
+
* Configuration is **env-only** (no JSON config files):
|
|
8
|
+
* - `HARNESS_VCC_COMPACTION` — default on; set `false` for Pi LLM compaction on /compact + auto-compact
|
|
9
|
+
* - `HARNESS_VCC_DEBUG` — set `true` to write `/tmp/pi-vcc-debug.json` on compaction
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
13
|
+
import registerVcc from "../../vendor/pi-vcc/index.js";
|
|
14
|
+
|
|
15
|
+
export default function ultimatePiVcc(pi: ExtensionAPI): void {
|
|
16
|
+
registerVcc(pi);
|
|
17
|
+
}
|
package/.pi/harness/README.md
CHANGED
|
@@ -19,7 +19,8 @@ This scaffold is intentionally minimal and safe to adopt incrementally.
|
|
|
19
19
|
```bash
|
|
20
20
|
UP_PKG="$(node -p "require('path').dirname(require.resolve('ultimate-pi/package.json'))")"
|
|
21
21
|
node "$UP_PKG/.pi/scripts/harness-verify.mjs"
|
|
22
|
-
node "$UP_PKG/.pi/scripts/sentrux-
|
|
22
|
+
node "$UP_PKG/.pi/scripts/harness-sentrux-bootstrap.mjs" # idempotent bootstrap (/harness-setup)
|
|
23
|
+
node "$UP_PKG/.pi/scripts/harness-sentrux-bootstrap.mjs" --force # after editing sentrux/architecture.manifest.json
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
## Governance Extensions
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.0.0",
|
|
3
|
+
"package": "ultimate-pi",
|
|
4
|
+
"package_version": "0.3.1",
|
|
5
|
+
"generated_at": "2026-05-16T08:44:48.417Z",
|
|
6
|
+
"agents": {
|
|
7
|
+
"pi-pi/agent-expert": {
|
|
8
|
+
"path": ".pi/agents/pi-pi/agent-expert.md",
|
|
9
|
+
"sha256": "f52f7310adc28c3e51fc21f7e82eb3c0ec8abf33a1936518355c673b21b9a706"
|
|
10
|
+
},
|
|
11
|
+
"pi-pi/cli-expert": {
|
|
12
|
+
"path": ".pi/agents/pi-pi/cli-expert.md",
|
|
13
|
+
"sha256": "6ecdbc37c60f1da7c68d504187454c95197dd19bd7091d97d136c6fb9e866838"
|
|
14
|
+
},
|
|
15
|
+
"pi-pi/config-expert": {
|
|
16
|
+
"path": ".pi/agents/pi-pi/config-expert.md",
|
|
17
|
+
"sha256": "c23b9b70a4c326cca2d139f18de48f8db2e0e28fa5ceb8205600f25430822a40"
|
|
18
|
+
},
|
|
19
|
+
"pi-pi/ext-expert": {
|
|
20
|
+
"path": ".pi/agents/pi-pi/ext-expert.md",
|
|
21
|
+
"sha256": "ae71ccf598217c830ac99e3150365a075bde931778d8bc6305d0270ac959a8a9"
|
|
22
|
+
},
|
|
23
|
+
"pi-pi/keybinding-expert": {
|
|
24
|
+
"path": ".pi/agents/pi-pi/keybinding-expert.md",
|
|
25
|
+
"sha256": "d8c3d645a507b453d9b338f7a5435232a23e4a00cb7981e3b81a4ce2a0df6bba"
|
|
26
|
+
},
|
|
27
|
+
"pi-pi/pi-orchestrator": {
|
|
28
|
+
"path": ".pi/agents/pi-pi/pi-orchestrator.md",
|
|
29
|
+
"sha256": "1323fc262112030320bdd7d7866fd69e1b861377bb30fd3553a5e3a4398f9090"
|
|
30
|
+
},
|
|
31
|
+
"pi-pi/prompt-expert": {
|
|
32
|
+
"path": ".pi/agents/pi-pi/prompt-expert.md",
|
|
33
|
+
"sha256": "0d9f5e3e8ab162149cac8f08e159a7b2150a11f53ebe7021e72f8277fa004d0c"
|
|
34
|
+
},
|
|
35
|
+
"pi-pi/skill-expert": {
|
|
36
|
+
"path": ".pi/agents/pi-pi/skill-expert.md",
|
|
37
|
+
"sha256": "91732a2479097a2645b6af56171d5cdc1ed67a0896ca54bc4badba250341698f"
|
|
38
|
+
},
|
|
39
|
+
"pi-pi/theme-expert": {
|
|
40
|
+
"path": ".pi/agents/pi-pi/theme-expert.md",
|
|
41
|
+
"sha256": "3d256049203356d87c36eac2232c0ad6261fec8af02eb15d3144b18a400ed64d"
|
|
42
|
+
},
|
|
43
|
+
"pi-pi/tui-expert": {
|
|
44
|
+
"path": ".pi/agents/pi-pi/tui-expert.md",
|
|
45
|
+
"sha256": "cd6aaf6ca28e6e65a72ef1dc3c96e3315669ec0f859c148f0f15d0ee74a263d7"
|
|
46
|
+
},
|
|
47
|
+
"harness/adversary": {
|
|
48
|
+
"path": ".pi/agents/harness/adversary.md",
|
|
49
|
+
"sha256": "17c29621d99dd46cf6ea6566845b502c5e825338b61f073a28cb53f297b2f208"
|
|
50
|
+
},
|
|
51
|
+
"harness/evaluator": {
|
|
52
|
+
"path": ".pi/agents/harness/evaluator.md",
|
|
53
|
+
"sha256": "71cfb070ec3bbec9d764052ba03fee8692f2db385ad19f15c2f3a157422c1c2b"
|
|
54
|
+
},
|
|
55
|
+
"harness/executor": {
|
|
56
|
+
"path": ".pi/agents/harness/executor.md",
|
|
57
|
+
"sha256": "02cd2f438d97abb9f35ca6cdab51b3733fc6a9076427cf9c2c93fd4593052539"
|
|
58
|
+
},
|
|
59
|
+
"harness/meta-optimizer": {
|
|
60
|
+
"path": ".pi/agents/harness/meta-optimizer.md",
|
|
61
|
+
"sha256": "faf81af85d273796f059395287058d2f16fe70903c70b8c6ac9b3c5f12fca69c"
|
|
62
|
+
},
|
|
63
|
+
"harness/planner": {
|
|
64
|
+
"path": ".pi/agents/harness/planner.md",
|
|
65
|
+
"sha256": "58d9c983bddddd37070f33742409f16474bf7c54bdccb8808fca4926f4adfdad"
|
|
66
|
+
},
|
|
67
|
+
"harness/sentrux-bootstrap": {
|
|
68
|
+
"path": ".pi/agents/harness/sentrux-bootstrap.md",
|
|
69
|
+
"sha256": "3a0b43b94386a7c541b8a806a37524a5e53f1c8049270db7a420680df5799eeb"
|
|
70
|
+
},
|
|
71
|
+
"harness/tie-breaker": {
|
|
72
|
+
"path": ".pi/agents/harness/tie-breaker.md",
|
|
73
|
+
"sha256": "c8fd02b3423760d9503e20ea27d3a90aa11326fc38c98f1e7253e67676b15e42"
|
|
74
|
+
},
|
|
75
|
+
"harness/trace-librarian": {
|
|
76
|
+
"path": ".pi/agents/harness/trace-librarian.md",
|
|
77
|
+
"sha256": "f44439758317b5fbae66b760bb6a1b6df19787d344bf7038712368e8fe0594ee"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -11,14 +11,16 @@ Sentrux enforces architecture via [`.sentrux/rules.toml`](https://sentrux.dev/do
|
|
|
11
11
|
|
|
12
12
|
1. **Canonical source:** [`.pi/harness/sentrux/architecture.manifest.json`](../../sentrux/architecture.manifest.json) — layers, boundaries, global constraints.
|
|
13
13
|
2. **Generated artifact:** `.sentrux/rules.toml` — committed to git; managed block between `harness:managed:start/end` markers.
|
|
14
|
-
3. **
|
|
15
|
-
4. **
|
|
16
|
-
5. **
|
|
17
|
-
|
|
14
|
+
3. **Bootstrap (idempotent):** `node "$UP_PKG/.pi/scripts/harness-sentrux-bootstrap.mjs"` — seeds manifest when missing, runs sync without `--force` when unchanged.
|
|
15
|
+
4. **Re-sync command:** `node "$UP_PKG/.pi/scripts/sentrux-rules-sync.mjs" --force` or `harness-sentrux-bootstrap.mjs --force` (resolve `$UP_PKG` via [.pi/scripts/README.md](../../../scripts/README.md)).
|
|
16
|
+
5. **Pi command:** `/harness-sentrux-sync` via `sentrux-rules-sync.ts` extension.
|
|
17
|
+
6. **When to sync:**
|
|
18
|
+
- `/harness-setup` Step 4.3 (after sentrux CLI install in Step 2.8)
|
|
18
19
|
- After editing `architecture.manifest.json`
|
|
19
20
|
- On `agent_end` when harness phase is `plan` or `merge`
|
|
20
21
|
- `node "$UP_PKG/.pi/scripts/harness-verify.mjs"` fails if manifest hash ≠ last sync (`--check`)
|
|
21
|
-
|
|
22
|
+
7. **Custom rules:** TOML outside the managed block is preserved on sync.
|
|
23
|
+
8. **Skill:** `harness-sentrux-setup` documents bootstrap vs `--force`.
|
|
22
24
|
|
|
23
25
|
## Consequences
|
|
24
26
|
|
|
@@ -34,5 +36,7 @@ Sentrux enforces architecture via [`.sentrux/rules.toml`](https://sentrux.dev/do
|
|
|
34
36
|
## References
|
|
35
37
|
|
|
36
38
|
- ADR 0006 (Sentrux dual layer)
|
|
39
|
+
- `.pi/scripts/harness-sentrux-bootstrap.mjs`
|
|
37
40
|
- `.pi/scripts/sentrux-rules-sync.mjs`
|
|
41
|
+
- `.agents/skills/harness-sentrux-setup/SKILL.md`
|
|
38
42
|
- `.pi/extensions/sentrux-rules-sync.ts`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ADR 0030: In-house VCC compaction (vendored pi-vcc)
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-05-17
|
|
5
|
+
- **Deciders:** ultimate-pi harness team
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
ultimate-pi depended on the npm package `@sting8k/pi-vcc` for deterministic, view-oriented session compaction (no LLM summarization call). We need that behavior by default for harness sessions, without an external package coupling, while preserving attribution to upstream [pi-vcc](https://github.com/sting8k/pi-vcc) and the conceptual [VCC](https://github.com/lllyasviel/VCC) work.
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
|
|
13
|
+
1. Vendor [sting8k/pi-vcc](https://github.com/sting8k/pi-vcc) under `vendor/pi-vcc/` (refresh via `npm run vendor:sync-vcc`), following the same pattern as `vendor/pi-model-router`.
|
|
14
|
+
2. Load compaction through [`.pi/extensions/ultimate-pi-vcc.ts`](../../../extensions/ultimate-pi-vcc.ts).
|
|
15
|
+
3. Remove `@sting8k/pi-vcc` from `package.json` dependencies and from `.pi/settings*.json` `packages` arrays.
|
|
16
|
+
4. **Configuration is env-only** — no JSON config files (`PI_VCC_CONFIG_PATH` and `.pi/pi-vcc-config.json` are not used).
|
|
17
|
+
5. **Default:** `HARNESS_VCC_COMPACTION` unset → VCC overrides Pi built-in LLM compaction for `/compact`, auto-threshold, and overflow.
|
|
18
|
+
6. **Opt-out:** `HARNESS_VCC_COMPACTION=false` (also `0` / `off`) uses Pi’s LLM compaction for those paths; explicit `/pi-vcc` still uses VCC.
|
|
19
|
+
7. **Debug:** `HARNESS_VCC_DEBUG=true` writes `/tmp/pi-vcc-debug.json` on compaction (default off).
|
|
20
|
+
8. Settings implementation: [`.pi/extensions/lib/harness-vcc-settings.ts`](../../../extensions/lib/harness-vcc-settings.ts).
|
|
21
|
+
9. Compaction telemetry `details.compactor` is `ultimate-pi-vcc`.
|
|
22
|
+
|
|
23
|
+
## Consequences
|
|
24
|
+
|
|
25
|
+
### Positive
|
|
26
|
+
|
|
27
|
+
- No runtime dependency on `@sting8k/pi-vcc` npm; vendored tree is pinned and patchable.
|
|
28
|
+
- Harness-default compaction matches ADR intent (deterministic, recall-friendly summaries).
|
|
29
|
+
- Operators can revert to LLM compaction per project via one env var.
|
|
30
|
+
|
|
31
|
+
### Negative / trade-offs
|
|
32
|
+
|
|
33
|
+
- Maintainer must run `vendor:sync-vcc` to pick up upstream pi-vcc fixes.
|
|
34
|
+
- Vendored `loadSettings` re-exports harness env settings from `.pi/extensions/lib/` (couples vendor tree to ultimate-pi layout).
|
|
35
|
+
|
|
36
|
+
## References
|
|
37
|
+
|
|
38
|
+
- [THIRD_PARTY_NOTICES.md](../../../../THIRD_PARTY_NOTICES.md)
|
|
39
|
+
- [vendor/pi-vcc/UPSTREAM_PIN.md](../../../../vendor/pi-vcc/UPSTREAM_PIN.md)
|
|
40
|
+
- [`.env.example`](../../../../.env.example) — `HARNESS_VCC_COMPACTION`, `HARNESS_VCC_DEBUG`
|
|
@@ -15,6 +15,7 @@ Team-shared ADRs for the ultimate-pi harness live under `.pi/harness/docs/adrs/`
|
|
|
15
15
|
| [0007](0007-interactive-drift-monitor.md) | Interactive drift monitor | Accepted |
|
|
16
16
|
| [0008](0008-harness-posthog-telemetry.md) | Harness PostHog telemetry | Accepted |
|
|
17
17
|
| [0009](0009-sentrux-rules-lifecycle.md) | Sentrux rules.toml lifecycle | Accepted |
|
|
18
|
+
| [0030](0030-inhouse-vcc-compaction.md) | In-house VCC compaction (vendored pi-vcc) | Accepted |
|
|
18
19
|
|
|
19
20
|
## Template
|
|
20
21
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# ultimate-pi harness — local secrets and paths (gitignored .env)
|
|
2
|
+
# Fill in values below; re-run /harness-setup to add newly introduced keys only.
|
|
3
|
+
|
|
4
|
+
# Telemetry (set false to disable harness PostHog events)
|
|
5
|
+
HARNESS_TELEMETRY_ENABLED=true
|
|
6
|
+
|
|
7
|
+
# harness-web (Scrapling) — local fetch/search; no API key
|
|
8
|
+
HARNESS_WEB_FETCH_MODE=stealth
|
|
9
|
+
HARNESS_WEB_SEARCH_ENGINE=ddg_html
|
|
10
|
+
# HARNESS_WEB_PROXY=
|
|
11
|
+
# HARNESS_WEB_RATE_LIMIT_MS=2000
|
|
12
|
+
# HARNESS_WEB_TIMEOUT_MS=30000
|
|
13
|
+
|
|
14
|
+
# PostHog (optional)
|
|
15
|
+
# POSTHOG_API_KEY=
|
|
16
|
+
# POSTHOG_PROJECT_NAME=ultimate-pi
|
|
17
|
+
# POSTHOG_PRIVACY_MODE=false
|
|
18
|
+
|
|
19
|
+
# Graphify semantic extract (optional; `graphify update .` needs no key)
|
|
20
|
+
# GEMINI_API_KEY=
|
|
21
|
+
# GOOGLE_API_KEY=
|
|
22
|
+
# OPENAI_API_KEY=
|
|
23
|
+
|
|
24
|
+
# Pi VCC compaction config path (project-relative)
|
|
25
|
+
PI_VCC_CONFIG_PATH=.pi/pi-vcc-config.json
|
|
26
|
+
|
|
27
|
+
# Wiki / vault (optional — Obsidian layer)
|
|
28
|
+
# VAULT_WIKI_PATH=vault/wiki
|
|
@@ -28,7 +28,12 @@
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "agents",
|
|
31
|
-
"paths": [
|
|
31
|
+
"paths": [
|
|
32
|
+
".pi/agents/*",
|
|
33
|
+
".pi/harness/agents.manifest.json",
|
|
34
|
+
".pi/prompts/*",
|
|
35
|
+
".agents/skills/*"
|
|
36
|
+
],
|
|
32
37
|
"order": 3,
|
|
33
38
|
"description": "Agent definitions, prompts, and skills"
|
|
34
39
|
},
|
|
@@ -34,7 +34,7 @@ If task is missing, stop and return:
|
|
|
34
34
|
- Adversarial review is always required.
|
|
35
35
|
- Merge blocking authority is severity-policy-engine.
|
|
36
36
|
- Router tuning is propose-and-approve only.
|
|
37
|
-
- Plan ambiguity must
|
|
37
|
+
- Plan ambiguity must use `ask_user` (harness-decisions skill) — no silent guessing.
|
|
38
38
|
- Rollback artifact must be revert-commit-ready and include:
|
|
39
39
|
- revert command
|
|
40
40
|
- prepared revert branch
|
|
@@ -69,7 +69,7 @@ Block commit/PR if any gate fails:
|
|
|
69
69
|
|
|
70
70
|
- `--quick` may reduce breadth, never safety gates.
|
|
71
71
|
- `--risk` can tighten behavior, never disable adversary.
|
|
72
|
-
- If risk/ambiguity is high, auto-fallback to manual `harness-plan` and
|
|
72
|
+
- If risk/ambiguity is high, auto-fallback to manual `harness-plan` and use `ask_user` for blocking forks.
|
|
73
73
|
- If execution must be interrupted safely, run `/harness-abort [reason]`, then restart with `/harness-plan "<task>"`.
|
|
74
74
|
- Always output trace bundle ID and incident/rollback references.
|
|
75
75
|
|
|
@@ -21,14 +21,14 @@ If task is missing, stop and return:
|
|
|
21
21
|
## Process
|
|
22
22
|
|
|
23
23
|
1. Parse the requested task and extract concrete scope and constraints.
|
|
24
|
-
2. If ambiguity blocks safe execution planning,
|
|
24
|
+
2. If ambiguity blocks safe execution planning, call `ask_user` (harness-decisions skill). Stop with `needs_clarification` if the user cancels.
|
|
25
25
|
3. Build a `PlanPacket` that is valid against `.pi/harness/specs/plan-packet.schema.json`.
|
|
26
26
|
4. Include rollback artifacts in all required forms.
|
|
27
27
|
|
|
28
28
|
## Hard requirements
|
|
29
29
|
|
|
30
30
|
- Do not run mutating tools in this command.
|
|
31
|
-
- If task scope is ambiguous,
|
|
31
|
+
- If task scope is ambiguous, call `ask_user` — do not guess or use prose-only clarification.
|
|
32
32
|
- Produce a `PlanPacket` matching `.pi/harness/specs/plan-packet.schema.json`.
|
|
33
33
|
- Include rollback artifacts in all three forms:
|
|
34
34
|
- revert command
|
|
@@ -39,8 +39,8 @@ node .pi/harness/router/propose-router-tuning.mjs \
|
|
|
39
39
|
--proposal-out .pi/harness/router/proposals/<id>.json
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
2.
|
|
43
|
-
3. Apply only with explicit approver + justification:
|
|
42
|
+
2. Call `ask_user` to approve / reject / request edits before apply (harness-decisions skill).
|
|
43
|
+
3. Apply only after approval, with explicit approver + justification:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
node .pi/harness/router/apply-router-proposal.mjs \
|
|
@@ -34,6 +34,7 @@ If `--plan` is missing, stop and return:
|
|
|
34
34
|
- Refuse execution if no valid plan packet is provided.
|
|
35
35
|
- Keep edits strictly within approved scope.
|
|
36
36
|
- If scope drift appears, stop and return to `harness-plan`.
|
|
37
|
+
- For **implementation forks** inside approved scope, call `ask_user` with 2–4 options. For plan-level ambiguity, stop and return to `harness-plan`.
|
|
37
38
|
- Record evaluator/adversary prerequisites for downstream gates.
|
|
38
39
|
- Always prepare rollback artifacts as part of execution output.
|
|
39
40
|
|