ultimate-pi 0.3.1 → 0.4.0

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.
Files changed (114) hide show
  1. package/.agents/skills/harness-decisions/SKILL.md +37 -0
  2. package/.agents/skills/harness-governor/SKILL.md +1 -1
  3. package/.agents/skills/harness-orchestration/SKILL.md +54 -0
  4. package/.agents/skills/harness-plan/SKILL.md +4 -3
  5. package/.agents/skills/harness-sentrux-setup/SKILL.md +57 -0
  6. package/.agents/skills/scrapling-web/SKILL.md +93 -0
  7. package/.pi/PACKAGING.md +2 -2
  8. package/.pi/SYSTEM.md +13 -15
  9. package/.pi/agents/harness/adversary.md +3 -0
  10. package/.pi/agents/harness/evaluator.md +3 -0
  11. package/.pi/agents/harness/executor.md +4 -1
  12. package/.pi/agents/harness/meta-optimizer.md +2 -1
  13. package/.pi/agents/harness/planner.md +22 -1
  14. package/.pi/agents/harness/sentrux-bootstrap.md +42 -0
  15. package/.pi/agents/harness/tie-breaker.md +2 -0
  16. package/.pi/extensions/harness-ask-user.ts +74 -0
  17. package/.pi/extensions/harness-subagents.ts +9 -0
  18. package/.pi/extensions/lib/ask-user/dialog.ts +260 -0
  19. package/.pi/extensions/lib/ask-user/fallback.ts +78 -0
  20. package/.pi/extensions/lib/ask-user/render.ts +66 -0
  21. package/.pi/extensions/lib/ask-user/schema.ts +69 -0
  22. package/.pi/extensions/lib/ask-user/types.ts +41 -0
  23. package/.pi/extensions/lib/ask-user/validate-core.mjs +79 -0
  24. package/.pi/extensions/lib/ask-user/validate.ts +92 -0
  25. package/.pi/extensions/lib/harness-subagents/agent-loader.ts +126 -0
  26. package/.pi/extensions/lib/harness-subagents/agent-manifest.ts +119 -0
  27. package/.pi/extensions/lib/harness-subagents/agent-parser.ts +87 -0
  28. package/.pi/extensions/lib/harness-subagents/blackboard-tool.ts +118 -0
  29. package/.pi/extensions/lib/harness-subagents/blackboard.ts +175 -0
  30. package/.pi/extensions/lib/harness-subagents/spawn-policy.ts +27 -0
  31. package/.pi/extensions/lib/harness-subagents/types-blackboard.ts +27 -0
  32. package/.pi/extensions/lib/harness-subagents/vendored/agent-manager.ts +553 -0
  33. package/.pi/extensions/lib/harness-subagents/vendored/agent-runner.ts +637 -0
  34. package/.pi/extensions/lib/harness-subagents/vendored/agent-types.ts +175 -0
  35. package/.pi/extensions/lib/harness-subagents/vendored/context.ts +59 -0
  36. package/.pi/extensions/lib/harness-subagents/vendored/cross-extension-rpc.ts +134 -0
  37. package/.pi/extensions/lib/harness-subagents/vendored/custom-agents.ts +5 -0
  38. package/.pi/extensions/lib/harness-subagents/vendored/default-agents.ts +123 -0
  39. package/.pi/extensions/lib/harness-subagents/vendored/env.ts +43 -0
  40. package/.pi/extensions/lib/harness-subagents/vendored/group-join.ts +144 -0
  41. package/.pi/extensions/lib/harness-subagents/vendored/index.ts +2447 -0
  42. package/.pi/extensions/lib/harness-subagents/vendored/invocation-config.ts +52 -0
  43. package/.pi/extensions/lib/harness-subagents/vendored/memory.ts +182 -0
  44. package/.pi/extensions/lib/harness-subagents/vendored/model-resolver.ts +92 -0
  45. package/.pi/extensions/lib/harness-subagents/vendored/output-file.ts +115 -0
  46. package/.pi/extensions/lib/harness-subagents/vendored/prompts.ts +103 -0
  47. package/.pi/extensions/lib/harness-subagents/vendored/schedule-store.ts +177 -0
  48. package/.pi/extensions/lib/harness-subagents/vendored/schedule.ts +416 -0
  49. package/.pi/extensions/lib/harness-subagents/vendored/settings.ts +210 -0
  50. package/.pi/extensions/lib/harness-subagents/vendored/skill-loader.ts +108 -0
  51. package/.pi/extensions/lib/harness-subagents/vendored/types.ts +187 -0
  52. package/.pi/extensions/lib/harness-subagents/vendored/ui/agent-widget.ts +637 -0
  53. package/.pi/extensions/lib/harness-subagents/vendored/ui/conversation-viewer.ts +324 -0
  54. package/.pi/extensions/lib/harness-subagents/vendored/ui/schedule-menu.ts +110 -0
  55. package/.pi/extensions/lib/harness-subagents/vendored/usage.ts +71 -0
  56. package/.pi/extensions/lib/harness-subagents/vendored/worktree.ts +195 -0
  57. package/.pi/harness/README.md +2 -1
  58. package/.pi/harness/agents.manifest.json +80 -0
  59. package/.pi/harness/docs/adrs/0009-sentrux-rules-lifecycle.md +9 -5
  60. package/.pi/harness/env.harness.template +28 -0
  61. package/.pi/harness/sentrux/architecture.manifest.json +6 -1
  62. package/.pi/prompts/harness-auto.md +2 -2
  63. package/.pi/prompts/harness-plan.md +2 -2
  64. package/.pi/prompts/harness-router-tune.md +2 -2
  65. package/.pi/prompts/harness-run.md +1 -0
  66. package/.pi/prompts/harness-setup.md +178 -339
  67. package/.pi/scripts/README.md +6 -1
  68. package/.pi/scripts/harness-agents-manifest.mjs +123 -0
  69. package/.pi/scripts/harness-cli-verify.sh +60 -11
  70. package/.pi/scripts/harness-generate-model-router.mjs +242 -0
  71. package/.pi/scripts/harness-graphify-bootstrap.sh +1 -6
  72. package/.pi/scripts/harness-resolve-up-pkg.mjs +71 -0
  73. package/.pi/scripts/harness-seed-project-contracts.mjs +33 -1
  74. package/.pi/scripts/harness-sentrux-bootstrap.mjs +146 -0
  75. package/.pi/scripts/harness-sync-env.mjs +148 -0
  76. package/.pi/scripts/harness-verify.mjs +19 -0
  77. package/.pi/scripts/harness-web-search.md +33 -0
  78. package/.pi/scripts/harness-web.py +177 -0
  79. package/.pi/scripts/harness_web/__init__.py +1 -0
  80. package/.pi/scripts/harness_web/config.py +80 -0
  81. package/.pi/scripts/harness_web/output.py +55 -0
  82. package/.pi/scripts/harness_web/scrape.py +120 -0
  83. package/.pi/scripts/harness_web/search_ddg.py +106 -0
  84. package/.pi/scripts/release.sh +338 -0
  85. package/.pi/scripts/sentrux-rules-sync.mjs +29 -7
  86. package/.pi/settings.example.json +0 -1
  87. package/.sentrux/rules.toml +1 -1
  88. package/AGENTS.md +1 -1
  89. package/CHANGELOG.md +12 -0
  90. package/THIRD_PARTY_NOTICES.md +22 -0
  91. package/package.json +12 -9
  92. package/.agents/skills/firecrawl/SKILL.md +0 -150
  93. package/.agents/skills/firecrawl/rules/install.md +0 -82
  94. package/.agents/skills/firecrawl/rules/security.md +0 -26
  95. package/.agents/skills/firecrawl-agent/SKILL.md +0 -57
  96. package/.agents/skills/firecrawl-build-interact/SKILL.md +0 -67
  97. package/.agents/skills/firecrawl-build-onboarding/SKILL.md +0 -102
  98. package/.agents/skills/firecrawl-build-onboarding/references/auth-flow.md +0 -39
  99. package/.agents/skills/firecrawl-build-onboarding/references/project-setup.md +0 -20
  100. package/.agents/skills/firecrawl-build-onboarding/references/sdk-installation.md +0 -17
  101. package/.agents/skills/firecrawl-build-scrape/SKILL.md +0 -68
  102. package/.agents/skills/firecrawl-build-search/SKILL.md +0 -68
  103. package/.agents/skills/firecrawl-crawl/SKILL.md +0 -58
  104. package/.agents/skills/firecrawl-download/SKILL.md +0 -69
  105. package/.agents/skills/firecrawl-interact/SKILL.md +0 -83
  106. package/.agents/skills/firecrawl-map/SKILL.md +0 -50
  107. package/.agents/skills/firecrawl-parse/SKILL.md +0 -61
  108. package/.agents/skills/firecrawl-scrape/SKILL.md +0 -68
  109. package/.agents/skills/firecrawl-search/SKILL.md +0 -59
  110. package/firecrawl/.env.template +0 -62
  111. package/firecrawl/README.md +0 -49
  112. package/firecrawl/docker-compose.yaml +0 -201
  113. package/firecrawl/searxng/searxng.env +0 -3
  114. package/firecrawl/searxng/settings.yml +0 -85
@@ -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. **Sync command:** `node "$UP_PKG/.pi/scripts/sentrux-rules-sync.mjs" --force` (resolve `$UP_PKG` via [.pi/scripts/README.md](../../../scripts/README.md)).
15
- 4. **Pi command:** `/harness-sentrux-sync` via `sentrux-rules-sync.ts` extension.
16
- 5. **When to sync:**
17
- - `/harness-setup` Step 2.8 (after sentrux install)
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
- 6. **Custom rules:** TOML outside the managed block is preserved on sync.
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,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": [".pi/agents/*", ".pi/prompts/*", ".agents/skills/*"],
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 request clarification (no silent guessing).
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 wait for clarification.
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, request clarification and stop.
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, request clarification and stop.
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. Review proposal (human approval required).
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