@piagent/platform 1.5.5 → 1.6.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.
Files changed (323) hide show
  1. package/CHANGELOG.md +166 -0
  2. package/README.md +25 -21
  3. package/README.vi.md +34 -5
  4. package/adapters/web-frontend/profile.json +2 -4
  5. package/architecture/layers.json +18 -3
  6. package/benchmarks/deep-logic-v1/SPECIALIST_PROTOCOL.vi.md +122 -0
  7. package/benchmarks/deep-logic-v1/grade.mjs +272 -10
  8. package/benchmarks/deep-logic-v1/project/apps/admin/src/billing-summary.js +3 -0
  9. package/benchmarks/deep-logic-v1/project/benchmark-contract/public-smoke.test.js +166 -0
  10. package/benchmarks/deep-logic-v1/project/package.json +1 -1
  11. package/benchmarks/deep-logic-v1/project/packages/billing/src/close-period.js +3 -0
  12. package/benchmarks/deep-logic-v1/project/packages/billing/src/plan-timeline.js +3 -0
  13. package/benchmarks/deep-logic-v1/project/test/smoke.test.js +7 -1
  14. package/benchmarks/deep-logic-v1/prompts/budgeted-context-graph.md +2 -0
  15. package/benchmarks/deep-logic-v1/prompts/fair-dependency-scheduler.md +2 -0
  16. package/benchmarks/deep-logic-v1/prompts/layered-policy-resolution.md +2 -0
  17. package/benchmarks/deep-logic-v1/prompts/resumable-stream-assembly.md +3 -1
  18. package/benchmarks/deep-logic-v1/prompts/revision-event-reconciliation.md +2 -0
  19. package/benchmarks/deep-logic-v1/prompts/temporal-usage-billing-close.md +123 -0
  20. package/benchmarks/deep-logic-v1/prompts/transactional-config-merge.md +2 -0
  21. package/benchmarks/deep-logic-v1/suite.json +51 -3
  22. package/benchmarks/deep-logic-v1/variant.mjs +22 -1
  23. package/benchmarks/production-v1/spend-control.v1.json +92 -0
  24. package/benchmarks/production-v1/suite.json +46 -3
  25. package/catalog/capabilities.json +18 -18
  26. package/docs/authority-manifest.md +1 -1
  27. package/docs/auto-delegation-policy.md +38 -73
  28. package/docs/command-reference-vietnamese.md +27 -35
  29. package/docs/context-engine.md +12 -4
  30. package/docs/context-window-policy.md +37 -1
  31. package/docs/distribution-standard.md +7 -7
  32. package/docs/en/architecture.md +27 -13
  33. package/docs/languages.json +4 -4
  34. package/docs/model-options.md +8 -5
  35. package/docs/operator-manual-vietnamese.md +27 -45
  36. package/docs/project-adapters.md +2 -2
  37. package/docs/publishing-for-teams.md +10 -0
  38. package/docs/quality-benchmark.md +427 -62
  39. package/docs/release-install-policy.md +10 -9
  40. package/docs/runtime-harness-standard.md +3 -3
  41. package/docs/runtime-policy-design.md +4 -4
  42. package/docs/runtime-quality-baseline.md +13 -6
  43. package/docs/security-threat-model.md +2 -2
  44. package/docs/subagent-orchestration-capabilities.md +19 -51
  45. package/docs/subagents-and-multiagent.md +21 -47
  46. package/docs/task-implementation-contract.md +3 -3
  47. package/docs/task-lifecycle-vietnamese.md +3 -3
  48. package/docs/team-onboarding.md +2 -2
  49. package/docs/usage-observability.md +7 -2
  50. package/docs/vi/architecture.md +27 -13
  51. package/docs-site/architecture.html +1 -1
  52. package/docs-site/benchmark.html +89 -95
  53. package/docs-site/commands.html +1 -1
  54. package/docs-site/content/benchmark.html +88 -94
  55. package/docs-site/content/en/benchmark.html +134 -90
  56. package/docs-site/content/en/index.html +19 -19
  57. package/docs-site/content/en/runtime.html +4 -4
  58. package/docs-site/content/en/whats-new.html +12 -1
  59. package/docs-site/content/en/workflows.html +2 -2
  60. package/docs-site/content/index.html +19 -19
  61. package/docs-site/content/runtime.html +4 -4
  62. package/docs-site/content/whats-new.html +12 -1
  63. package/docs-site/content/workflows.html +2 -2
  64. package/docs-site/context-engine.html +1 -1
  65. package/docs-site/en/architecture.html +1 -1
  66. package/docs-site/en/benchmark.html +135 -91
  67. package/docs-site/en/commands.html +1 -1
  68. package/docs-site/en/context-engine.html +1 -1
  69. package/docs-site/en/index.html +20 -20
  70. package/docs-site/en/mcp-approval.html +1 -1
  71. package/docs-site/en/mcp-auth.html +1 -1
  72. package/docs-site/en/mcp-servers.html +1 -1
  73. package/docs-site/en/mcp.html +1 -1
  74. package/docs-site/en/permissions.html +1 -1
  75. package/docs-site/en/profiles.html +1 -1
  76. package/docs-site/en/quickstart.html +1 -1
  77. package/docs-site/en/runtime.html +5 -5
  78. package/docs-site/en/scope.html +1 -1
  79. package/docs-site/en/security.html +1 -1
  80. package/docs-site/en/team.html +1 -1
  81. package/docs-site/en/whats-new.html +13 -2
  82. package/docs-site/en/workflows.html +3 -3
  83. package/docs-site/index.html +20 -20
  84. package/docs-site/mcp-approval.html +1 -1
  85. package/docs-site/mcp-auth.html +1 -1
  86. package/docs-site/mcp-servers.html +1 -1
  87. package/docs-site/mcp.html +1 -1
  88. package/docs-site/permissions.html +1 -1
  89. package/docs-site/profiles.html +1 -1
  90. package/docs-site/quickstart.html +1 -1
  91. package/docs-site/runtime.html +5 -5
  92. package/docs-site/scope.html +1 -1
  93. package/docs-site/security.html +1 -1
  94. package/docs-site/team.html +1 -1
  95. package/docs-site/whats-new.html +13 -2
  96. package/docs-site/workflows.html +3 -3
  97. package/evals/fixtures/benchmark-assurance-evidence.invalid.json +1 -1
  98. package/evals/fixtures/benchmark-assurance-evidence.valid.json +1 -1
  99. package/evals/fixtures/codex-relative-efficiency-v1.invalid.json +4 -0
  100. package/evals/fixtures/codex-relative-efficiency-v1.valid.json +94 -0
  101. package/evals/fixtures/helper-request.invalid.json +1 -1
  102. package/evals/fixtures/helper-request.valid.json +1 -1
  103. package/evals/fixtures/piagent-webui/session-live-state-v1.invalid.json +18 -0
  104. package/evals/fixtures/piagent-webui/session-live-state-v1.valid.json +27 -0
  105. package/evals/fixtures/piagent-webui/subagent-tree-v1.valid.json +7 -0
  106. package/evals/fixtures/task-authority-snapshot.valid.json +4 -4
  107. package/evals/fs4-readiness-matrix.v1.json +2 -2
  108. package/evals/fs5-causal-arm.v1.json +3 -3
  109. package/evals/fs5-pilot-protocol.v1.json +3 -3
  110. package/evals/fs5-pilot-protocol.v2.json +8 -8
  111. package/evals/fs5-pilot-protocol.v3.json +8 -8
  112. package/evals/fs5-pilot-protocol.v4.json +7 -6
  113. package/evals/fs5-pilot-protocol.v5.json +9 -7
  114. package/evals/private-holdout-v1/public-exposure.v1.json +1 -1
  115. package/evals/runtime-conformance-v1/README.md +43 -0
  116. package/evals/runtime-conformance-v1/evaluate-paid-canary.mjs +198 -0
  117. package/evals/runtime-conformance-v1/lane.json +57 -0
  118. package/evals/runtime-conformance-v1/paid-canary.json +31 -0
  119. package/evals/runtime-conformance-v1/runner.mjs +456 -0
  120. package/package.json +3 -1
  121. package/packages/piagent-core/README.md +13 -4
  122. package/packages/piagent-core/benchmark/benchmark-assurance.js +4 -1
  123. package/packages/piagent-core/benchmark/benchmark-bootstrap.js +91 -9
  124. package/packages/piagent-core/benchmark/benchmark-claim-restrictions.js +38 -7
  125. package/packages/piagent-core/benchmark/benchmark-cli.js +7 -7
  126. package/packages/piagent-core/benchmark/benchmark-codex-relative-efficiency.js +698 -0
  127. package/packages/piagent-core/benchmark/benchmark-codex.js +3 -1
  128. package/packages/piagent-core/benchmark/benchmark-comparison.js +271 -2
  129. package/packages/piagent-core/benchmark/benchmark-core.js +736 -664
  130. package/packages/piagent-core/benchmark/benchmark-execution-guard.js +7 -5
  131. package/packages/piagent-core/benchmark/benchmark-forensics.js +441 -4
  132. package/packages/piagent-core/benchmark/benchmark-host-readiness.js +639 -0
  133. package/packages/piagent-core/benchmark/benchmark-matrix.js +22 -4
  134. package/packages/piagent-core/benchmark/benchmark-normalized-cost.js +317 -0
  135. package/packages/piagent-core/benchmark/benchmark-preflight.js +5 -1
  136. package/packages/piagent-core/benchmark/benchmark-process.js +6 -5
  137. package/packages/piagent-core/benchmark/benchmark-provider-free-evidence.js +345 -0
  138. package/packages/piagent-core/benchmark/benchmark-provider-wire.js +126 -0
  139. package/packages/piagent-core/benchmark/benchmark-record-validation.js +252 -0
  140. package/packages/piagent-core/benchmark/benchmark-report.js +130 -12
  141. package/packages/piagent-core/benchmark/benchmark-resume-recovery.js +14 -0
  142. package/packages/piagent-core/benchmark/benchmark-runner-policy.js +26 -0
  143. package/packages/piagent-core/benchmark/benchmark-runtime-causal.js +244 -0
  144. package/packages/piagent-core/benchmark/benchmark-stage-diagnostic.js +979 -0
  145. package/packages/piagent-core/benchmark/benchmark-statistics.js +64 -0
  146. package/packages/piagent-core/benchmark/benchmark-stop-policy.js +8 -5
  147. package/packages/piagent-core/benchmark/benchmark-suite-identity.js +31 -0
  148. package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +13 -9
  149. package/packages/piagent-core/benchmark/benchmark-suite.js +149 -2
  150. package/packages/piagent-core/benchmark/benchmark-summary-support.js +380 -0
  151. package/packages/piagent-core/benchmark/benchmark-timing-diagnostics.js +971 -0
  152. package/packages/piagent-core/benchmark/benchmark-usage.js +322 -0
  153. package/packages/piagent-core/benchmark/benchmark-workflow.js +166 -0
  154. package/packages/piagent-core/capabilities/runtime-integrity.js +3 -0
  155. package/packages/piagent-core/docs/context-efficiency-improvement-plan.md +1080 -0
  156. package/packages/piagent-core/extensions/acceptance-behavior-proof.js +806 -0
  157. package/packages/piagent-core/extensions/acceptance-contract-semantics.js +83 -69
  158. package/packages/piagent-core/extensions/acceptance-error-classes.js +160 -0
  159. package/packages/piagent-core/extensions/acceptance-executable-evidence.js +12 -9
  160. package/packages/piagent-core/extensions/acceptance-receipt.js +123 -59
  161. package/packages/piagent-core/extensions/acceptance-state-machine-evidence.js +518 -0
  162. package/packages/piagent-core/extensions/acceptance-test-binding-evidence.js +60 -0
  163. package/packages/piagent-core/extensions/context-efficiency-metrics.js +302 -0
  164. package/packages/piagent-core/extensions/context-efficiency-report.js +167 -0
  165. package/packages/piagent-core/extensions/context-engine.js +149 -156
  166. package/packages/piagent-core/extensions/context-evidence.js +48 -0
  167. package/packages/piagent-core/extensions/context-import-links.js +296 -0
  168. package/packages/piagent-core/extensions/context-index-policy.js +4 -0
  169. package/packages/piagent-core/extensions/context-query-paths.js +57 -0
  170. package/packages/piagent-core/extensions/context-telemetry-integrity.js +65 -0
  171. package/packages/piagent-core/extensions/criterion-context-pack.js +435 -7
  172. package/packages/piagent-core/extensions/criterion-graph.js +82 -9
  173. package/packages/piagent-core/extensions/fallback-base-policy.ts +101 -0
  174. package/packages/piagent-core/extensions/guard-types.ts +6 -0
  175. package/packages/piagent-core/extensions/javascript-regex-evidence.js +32 -0
  176. package/packages/piagent-core/extensions/piagent-guard.ts +420 -260
  177. package/packages/piagent-core/extensions/task-contract-view.js +17 -3
  178. package/packages/piagent-core/extensions/task-lifecycle.js +39 -2
  179. package/packages/piagent-core/extensions/task-state.js +109 -142
  180. package/packages/piagent-core/extensions/verification-intelligence.js +52 -13
  181. package/packages/piagent-core/extensions/workspace-evidence-roots.js +193 -0
  182. package/packages/piagent-core/package.json +1 -1
  183. package/packages/piagent-core/policies/base-policy.json +44 -2
  184. package/packages/piagent-core/policy/authority-manifest.v1.json +3 -3
  185. package/packages/piagent-core/prompts/be-to-fe.md +2 -8
  186. package/packages/piagent-core/prompts/plan.md +1 -1
  187. package/packages/piagent-core/prompts/platform-improve.md +2 -6
  188. package/packages/piagent-core/prompts/review.md +2 -7
  189. package/packages/piagent-core/prompts/scout.md +1 -1
  190. package/packages/piagent-core/prompts/task.md +4 -3
  191. package/packages/piagent-core/runtime/context/context-delivery.ts +103 -0
  192. package/packages/piagent-core/runtime/context/context-delta-shadow.ts +53 -0
  193. package/packages/piagent-core/runtime/context/context-efficiency-format.ts +47 -0
  194. package/packages/piagent-core/runtime/context/context-evidence-qualification.ts +32 -0
  195. package/packages/piagent-core/runtime/context/prefix-telemetry.ts +47 -0
  196. package/packages/piagent-core/runtime/context/repository-memory-hints.ts +27 -0
  197. package/packages/piagent-core/runtime/hooks/agent-prompt-telemetry.ts +56 -0
  198. package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +162 -102
  199. package/packages/piagent-core/runtime/hooks/completion-hook.ts +12 -12
  200. package/packages/piagent-core/runtime/hooks/input-hook.ts +17 -1
  201. package/packages/piagent-core/runtime/hooks/session-hooks.ts +22 -2
  202. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +107 -3
  203. package/packages/piagent-core/runtime/hooks/tool-result-content-guards.ts +95 -0
  204. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +134 -166
  205. package/packages/piagent-core/runtime/hooks/tool-result-value-helpers.ts +66 -0
  206. package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +4 -2
  207. package/packages/piagent-core/runtime/inspection/activity-recovery.ts +104 -0
  208. package/packages/piagent-core/runtime/inspection/bounded-emission-guard.ts +286 -0
  209. package/packages/piagent-core/runtime/inspection/runtime-event-store.ts +37 -7
  210. package/packages/piagent-core/runtime/inspection/task-compaction-history.ts +1 -1
  211. package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +1 -1
  212. package/packages/piagent-core/runtime/inspection/task-subagent-tree.ts +27 -4
  213. package/packages/piagent-core/runtime/inspection/tool-failure-classification.ts +70 -0
  214. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +73 -9
  215. package/packages/piagent-core/runtime/model/authenticated-catalog.ts +17 -9
  216. package/packages/piagent-core/runtime/model/openai-codex-reasoning.ts +83 -0
  217. package/packages/piagent-core/runtime/model/provider-wire-fingerprint.ts +238 -0
  218. package/packages/piagent-core/runtime/orchestration/helper-lifecycle.ts +16 -12
  219. package/packages/piagent-core/runtime/orchestration/minimal-delegation-policy.ts +71 -0
  220. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +28 -20
  221. package/packages/piagent-core/runtime/orchestration/role-policy.ts +27 -9
  222. package/packages/piagent-core/runtime/orchestration/subagent-tool-policy.ts +329 -0
  223. package/packages/piagent-core/runtime/policy/block-remedy.ts +0 -4
  224. package/packages/piagent-core/runtime/product/activity-inspector.ts +7 -2
  225. package/packages/piagent-core/runtime/product/efficiency-metrics.ts +7 -2
  226. package/packages/piagent-core/runtime/quality/edit-freshness-guard.ts +102 -0
  227. package/packages/piagent-core/runtime/quality/exact-output-contract.ts +22 -11
  228. package/packages/piagent-core/runtime/quality/performance-assurance-signals.ts +23 -0
  229. package/packages/piagent-core/runtime/quality/performance-assurance.ts +9 -5
  230. package/packages/piagent-core/runtime/recovery/continuation-budget.ts +1 -1
  231. package/packages/piagent-core/runtime/recovery/edit-recovery-context.ts +113 -0
  232. package/packages/piagent-core/runtime/recovery/edit-recovery-delivery.ts +42 -0
  233. package/packages/piagent-core/runtime/recovery/handoff-projection.ts +4 -1
  234. package/packages/piagent-core/runtime/recovery/pristine-task-policy-refresh.ts +91 -0
  235. package/packages/piagent-core/runtime/recovery/recovery-policy.ts +7 -4
  236. package/packages/piagent-core/runtime/recovery/resume-state.ts +112 -14
  237. package/packages/piagent-core/runtime/recovery/semantic-repair-handshake.ts +60 -13
  238. package/packages/piagent-core/runtime/recovery/semantic-repair-runtime.ts +55 -2
  239. package/packages/piagent-core/runtime/recovery/task-evidence-coverage-refresh.ts +217 -0
  240. package/packages/piagent-core/runtime/registration/context-commands.ts +82 -7
  241. package/packages/piagent-core/runtime/registration/knowledge-tools.ts +9 -5
  242. package/packages/piagent-core/runtime/registration/operator-request-intake.ts +49 -0
  243. package/packages/piagent-core/runtime/registration/policy-tools.ts +50 -15
  244. package/packages/piagent-core/runtime/registration/session-commands.ts +1 -1
  245. package/packages/piagent-core/runtime/registration/task-completion-tools.ts +61 -25
  246. package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +21 -12
  247. package/packages/piagent-core/runtime/registration/task-start-guidance.ts +169 -0
  248. package/packages/piagent-core/runtime/registration/task-start-manifest.ts +54 -0
  249. package/packages/piagent-core/runtime/registration/task-start-retry-helpers.ts +37 -0
  250. package/packages/piagent-core/runtime/registration/task-start-tool.ts +108 -103
  251. package/packages/piagent-core/runtime/runtime-limits.ts +16 -2
  252. package/packages/piagent-core/runtime/session/adaptive-context-analysis.ts +461 -0
  253. package/packages/piagent-core/runtime/session/adaptive-context-governor.ts +464 -0
  254. package/packages/piagent-core/runtime/session/adaptive-context-ledger.ts +265 -0
  255. package/packages/piagent-core/runtime/session/message-signals.ts +7 -3
  256. package/packages/piagent-core/runtime/session/operator-request-carry.ts +44 -0
  257. package/packages/piagent-core/runtime/session/runtime-state.ts +161 -5
  258. package/packages/piagent-core/runtime/session/source-checkout-read-grants.ts +35 -0
  259. package/packages/piagent-core/runtime/session/system-prompt.ts +76 -14
  260. package/packages/piagent-core/runtime/session/task-contract-presentation.ts +39 -0
  261. package/packages/piagent-core/runtime/tools/apply-patch-tool.ts +500 -0
  262. package/packages/piagent-core/runtime/tools/phase-tools.ts +8 -8
  263. package/packages/piagent-core/runtime/tools/tool-groups.ts +12 -2
  264. package/packages/piagent-core/runtime/trajectory/trajectory-runtime.ts +2 -1
  265. package/packages/piagent-core/runtime/verification/exact-verifier-reuse.ts +101 -0
  266. package/packages/piagent-core/runtime/workflows/runtime-intake-compaction.ts +164 -0
  267. package/packages/piagent-core/runtime/workflows/task-intake.ts +207 -38
  268. package/packages/piagent-core/security/sensitive-data.js +13 -218
  269. package/packages/piagent-core/security/sensitive-project-file.js +42 -0
  270. package/packages/piagent-core/security/sensitive-source-expression.js +330 -0
  271. package/packages/piagent-core/security/sensitive-source-formats.js +394 -0
  272. package/packages/piagent-core/security/sensitive-text.js +234 -0
  273. package/packages/piagent-core/subagents/piagent-oracle.md +5 -3
  274. package/packages/piagent-core/subagents/piagent-planner.md +6 -4
  275. package/packages/piagent-core/subagents/piagent-reviewer.md +5 -3
  276. package/packages/piagent-core/subagents/piagent-scout.md +4 -2
  277. package/packages/piagent-core/subagents/piagent-worker.md +7 -5
  278. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-rD9WJKxs.js → MarkdownMessage-B4XehTCU.js} +1 -1
  279. package/packages/piagent-webui/dist/client/assets/index-CgOEyRPG.js +176 -0
  280. package/packages/piagent-webui/dist/client/index.html +1 -1
  281. package/packages/piagent-webui/extension/piagent-webui.ts +3 -1
  282. package/packages/piagent-webui/extension/same-session-bridge.ts +1 -1
  283. package/packages/piagent-webui/extension/session-stream-adapter.ts +33 -10
  284. package/packages/piagent-webui/gateway/gateway-events.ts +109 -5
  285. package/packages/piagent-webui/gateway/gateway-service.ts +3 -0
  286. package/packages/piagent-webui/gateway/gateway-session-stream.ts +122 -20
  287. package/packages/piagent-webui/gateway/session-command-controller.ts +18 -3
  288. package/packages/piagent-webui/gateway/session-effective-options.ts +47 -0
  289. package/packages/piagent-webui/gateway/session-live-state.ts +21 -0
  290. package/packages/piagent-webui/gateway/session-operation-lifecycle.ts +237 -0
  291. package/packages/piagent-webui/gateway/session-operation-retry-control.ts +38 -0
  292. package/packages/piagent-webui/gateway/session-operation-start.ts +5 -1
  293. package/packages/piagent-webui/gateway/session-operation-watchdog.ts +165 -0
  294. package/packages/piagent-webui/gateway/session-runtime-factory.ts +45 -0
  295. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +141 -125
  296. package/packages/piagent-webui/ownership/session-lease-store.ts +5 -2
  297. package/packages/piagent-webui/server/core-inspection-provider.ts +2 -1
  298. package/packages/piagent-webui/server/loopback-server.ts +8 -0
  299. package/packages/piagent-webui/server/transcript-projection.ts +113 -9
  300. package/packages/piagent-webui/shared/text-visibility.ts +10 -0
  301. package/schemas/codex-relative-efficiency-v1.schema.json +155 -0
  302. package/schemas/piagent-webui/catalog-v1.json +9 -0
  303. package/schemas/piagent-webui/gateway-protocol-v1.schema.json +53 -3
  304. package/schemas/piagent-webui/runtime-event-v2.schema.json +15 -5
  305. package/schemas/piagent-webui/session-live-state-v1.schema.json +76 -0
  306. package/schemas/piagent-webui/subagent-tree-v1.schema.json +11 -1
  307. package/schemas/project-profile.schema.json +1 -1
  308. package/schemas/task-contract.schema.json +27 -1
  309. package/scripts/benchmark-runner-core.mjs +367 -363
  310. package/scripts/benchmark-runner-finalization.mjs +313 -0
  311. package/scripts/benchmark-runner-host-readiness.mjs +94 -0
  312. package/scripts/benchmark-runner-support.mjs +200 -0
  313. package/scripts/benchmark-session.mjs +95 -41
  314. package/scripts/configure-model-scope.sh +4 -3
  315. package/scripts/configure-subagents.sh +42 -34
  316. package/scripts/helper-evaluation.mjs +2 -2
  317. package/scripts/install-global.sh +2 -2
  318. package/scripts/pi-usage-history.mjs +37 -10
  319. package/scripts/setup.sh +2 -2
  320. package/scripts/team-doctor.sh +1 -1
  321. package/scripts/verify-local.sh +10 -1
  322. package/templates/global/settings.json +2 -1
  323. package/packages/piagent-webui/dist/client/assets/index-BZRFw1u6.js +0 -174
@@ -1,123 +1,158 @@
1
1
  <section class="benchmark-summary" aria-labelledby="benchmark-verdict">
2
2
  <div class="benchmark-verdict">
3
3
  <div>
4
- <p class="section-kicker">Production V1 · historical public regression evidence</p>
5
- <h2 id="benchmark-verdict">Piagent scores 9.92/10</h2>
6
- <p>It resolved all 54 tasks, maintained 10/10 Quality, Safety, and Reliability, and used 51.11% fewer fresh tokens than the <code>codex-cli</code> surface in paired measurement.</p>
4
+ <p class="section-kicker">Historical Production V1 · v1.6.0 public regression evidence</p>
5
+ <h2 id="benchmark-verdict">Historical fresh-token score: 9.97/10</h2>
6
+ <p>Piagent resolved 54/54 tasks and used 61.43% fewer fresh tokens under the v1.6.0 fixed-workload estimand, using the same GPT-5.6 Luna Medium configuration and the same 108-session matrix as the <code>codex-cli</code> surface. Total traffic and API-equivalent cost remain diagnostic, so this run is not proof that Piagent costs 30–40% less than <code>codex-cli</code>.</p>
7
7
  </div>
8
- <div class="benchmark-verdict-score" aria-label="Overall score 9.92 out of 10">
9
- <strong>9.92</strong>
8
+ <div class="benchmark-verdict-score" aria-label="Overall score 9.97 out of 10">
9
+ <strong>9.97</strong>
10
10
  <span>Overall / 10</span>
11
11
  </div>
12
12
  </div>
13
13
 
14
14
  <div class="benchmark-metrics" aria-label="Headline metrics">
15
- <div class="benchmark-metric"><span>Tasks resolved</span><strong>54/54</strong><small>100% on both surfaces</small></div>
16
- <div class="benchmark-metric"><span>Fresh tokens</span><strong>-51.11%</strong><small>paired geometric mean</small></div>
17
- <div class="benchmark-metric"><span>Token wins</span><strong>47/54</strong><small><code>codex-cli</code> won 7 pairs</small></div>
18
- <div class="benchmark-metric"><span>Infrastructure</span><strong>0 retries</strong><small>108 valid runs</small></div>
15
+ <div class="benchmark-metric">
16
+ <span>Tasks resolved</span>
17
+ <strong>54/54</strong>
18
+ <small><code>codex-cli</code>: 48/54</small>
19
+ </div>
20
+ <div class="benchmark-metric">
21
+ <span>Fresh tokens</span>
22
+ <strong>-61.43%</strong>
23
+ <small>fixed-workload family ratio</small>
24
+ </div>
25
+ <div class="benchmark-metric">
26
+ <span>Conservative 95% bound</span>
27
+ <strong>-51.60%</strong>
28
+ <small>ratio upper bound 0.4840</small>
29
+ </div>
30
+ <div class="benchmark-metric">
31
+ <span>Integrity</span>
32
+ <strong>108/108 exact</strong>
33
+ <small>0 infrastructure retries</small>
34
+ </div>
19
35
  </div>
20
36
  </section>
21
37
 
22
38
  <section class="section">
23
39
  <p class="section-kicker">Measurement configuration</p>
24
40
  <h2 id="configuration">Same model, same tasks, automatic grading</h2>
25
- <p class="section-lead">The suite runs Piagent and the <code>codex-cli</code> surface in separate clean workspaces with matching fixtures, generated variants, and hidden verifiers. Usage is parsed from agent JSONL rather than entered manually.</p>
41
+ <p class="section-lead">The suite runs Piagent and the <code>codex-cli</code> surface in separate clean workspaces with matching fixtures, generated variants, and hidden verifiers. Usage comes from exact provider token buckets rather than manual entry.</p>
42
+
26
43
  <dl class="benchmark-facts">
27
- <div><dt>Model</dt><dd><code>openai-codex/gpt-5.6-sol</code></dd></div>
28
- <div><dt>Thinking</dt><dd><code>xhigh</code></dd></div>
44
+ <div><dt>Model</dt><dd><code>openai-codex/gpt-5.6-luna</code></dd></div>
45
+ <div><dt>Thinking</dt><dd><code>medium</code></dd></div>
29
46
  <div><dt>Matrix</dt><dd>18 families × 3 repeats × 2 surfaces</dd></div>
30
47
  <div><dt>Total sessions</dt><dd>108</dd></div>
31
48
  <div><dt>Baseline</dt><dd><code>codex-cli</code> controlled mode</dd></div>
32
- <div><dt>Duration</dt><dd>1 hour 49 minutes</dd></div>
49
+ <div><dt>Release</dt><dd><code>v1.6.0</code></dd></div>
33
50
  </dl>
51
+
34
52
  <div class="callout ok-callout">
35
- <strong>Isolated control surface</strong>
36
- <p><code>codex-cli</code> uses a temporary home per session and loads no global instructions, plugins, apps, browser, or multi-agent configuration. Both surfaces use the same model and thinking level with a 900-second timeout per session.</p>
53
+ <strong>Isolated control surface with complete accounting</strong>
54
+ <p><code>codex-cli</code> uses a temporary home per session and loads no global instructions, plugins, apps, browser, or multi-agent configuration. Both surfaces are pinned to the same model and thinking level; all 108 accepted attempts have exact usage and no retry can hide tokens from a failed run.</p>
55
+ </div>
56
+ <div class="callout">
57
+ <strong>The historical result is not a cost claim.</strong>
58
+ <p>The new diagnostic counts cache read/write traffic, prices exact input/cache/output buckets with a versioned snapshot, and includes provider-started failed attempts. A future suite may enable the 0.70 cost gate only after exact per-request usage is available; the v1.6.0 artifact must not be used as a subscription-spend or Codex-relative cost claim.</p>
37
59
  </div>
38
60
  </section>
39
61
 
40
62
  <section class="section">
41
63
  <p class="section-kicker">Score bands</p>
42
64
  <h2 id="scores">Token reduction does not trade away quality</h2>
43
- <p class="section-lead">Overall is calculated only when quality, safety, reliability, and workflow gates all pass. The <code>codex-cli</code> surface is the baseline and does not receive the harness-specific Workflow or Overall score.</p>
44
- <div class="benchmark-score-chart" role="img" aria-label="Piagent scores Quality 10, Safety 10, Reliability 10, Workflow 9.58, Efficiency 10, and Overall 9.92 out of 10">
45
- <div class="benchmark-score-row"><span>Quality</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
46
- <div class="benchmark-score-row"><span>Safety</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
47
- <div class="benchmark-score-row"><span>Reliability</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
48
- <div class="benchmark-score-row"><span>Workflow</span><div class="benchmark-track"><i style="--bar-size: 95.8%"></i></div><strong>9.58</strong></div>
49
- <div class="benchmark-score-row"><span>Efficiency</span><div class="benchmark-track"><i style="--bar-size: 100%"></i></div><strong>10.00</strong></div>
50
- <div class="benchmark-score-row overall"><span>Overall</span><div class="benchmark-track"><i style="--bar-size: 99.2%"></i></div><strong>9.92</strong></div>
65
+ <p class="section-lead">The token claim opens only after quality, safety, reliability, workflow, paired no-regression, candidate continuity, protocol, and accounting gates all pass. The six unresolved baseline outcomes remain in the fixed workload and are not dropped from the primary token estimator.</p>
66
+
67
+ <div class="benchmark-score-chart" role="img" aria-label="Piagent scores Quality 10, Safety 10, Reliability 10, Workflow 9.85, Efficiency 10, and Overall 9.97 out of 10">
68
+ <div class="benchmark-score-row">
69
+ <span>Quality</span>
70
+ <div class="benchmark-track"><i style="--bar-size: 100%"></i></div>
71
+ <strong>10.00</strong>
72
+ </div>
73
+ <div class="benchmark-score-row">
74
+ <span>Safety</span>
75
+ <div class="benchmark-track"><i style="--bar-size: 100%"></i></div>
76
+ <strong>10.00</strong>
77
+ </div>
78
+ <div class="benchmark-score-row">
79
+ <span>Reliability</span>
80
+ <div class="benchmark-track"><i style="--bar-size: 100%"></i></div>
81
+ <strong>10.00</strong>
82
+ </div>
83
+ <div class="benchmark-score-row">
84
+ <span>Workflow</span>
85
+ <div class="benchmark-track"><i style="--bar-size: 98.5%"></i></div>
86
+ <strong>9.85</strong>
87
+ </div>
88
+ <div class="benchmark-score-row">
89
+ <span>Efficiency</span>
90
+ <div class="benchmark-track"><i style="--bar-size: 100%"></i></div>
91
+ <strong>10.00</strong>
92
+ </div>
93
+ <div class="benchmark-score-row overall">
94
+ <span>Overall</span>
95
+ <div class="benchmark-track"><i style="--bar-size: 99.7%"></i></div>
96
+ <strong>9.97</strong>
97
+ </div>
51
98
  </div>
99
+
52
100
  <div class="table-wrap benchmark-table-wrap">
53
101
  <table>
54
- <thead><tr><th>Band</th><th>Piagent</th><th>codex-cli</th><th>Evidence</th></tr></thead>
102
+ <thead><tr><th>Gate or band</th><th>Piagent</th><th>Evidence</th></tr></thead>
55
103
  <tbody>
56
- <tr><td>Quality</td><td><strong>10.00</strong></td><td>10.00</td><td>48/48 source tasks passed hidden graders</td></tr>
57
- <tr><td>Safety</td><td><strong>10.00</strong></td><td>10.00</td><td>54/54 sessions stayed in scope and emitted no forbidden output</td></tr>
58
- <tr><td>Reliability</td><td><strong>10.00</strong></td><td>10.00</td><td>54/54 resolved across all 18 families</td></tr>
59
- <tr><td>Workflow</td><td><strong>9.58</strong></td><td>n/a</td><td>Passed the 9.00 gate with every evidence gap disclosed</td></tr>
60
- <tr><td>Efficiency</td><td><strong>10.00</strong></td><td>5.00 baseline</td><td>54 valid usage pairs with the same model and thinking</td></tr>
61
- <tr><td>Overall</td><td><strong>9.92</strong></td><td>n/a</td><td>Quality 45%, reliability 15%, workflow 20%, efficiency 20%</td></tr>
104
+ <tr><td>Quality</td><td><strong>10.00</strong></td><td>Paired no-quality-regression gate passed</td></tr>
105
+ <tr><td>Safety</td><td><strong>10.00</strong></td><td>Scope and output-safety gates passed</td></tr>
106
+ <tr><td>Reliability</td><td><strong>10.00</strong></td><td>54/54 Piagent sessions resolved</td></tr>
107
+ <tr><td>Workflow</td><td><strong>9.85</strong></td><td>Candidate continuity and workflow gates passed</td></tr>
108
+ <tr><td>Efficiency</td><td><strong>10.00</strong></td><td>Fixed-workload efficiency gate passed</td></tr>
109
+ <tr><td>Primary tokens</td><td><strong>Pass</strong></td><td>Ratio 0.3857; upper 95% 0.4840 ≤ 0.60</td></tr>
110
+ <tr><td>Overall</td><td><strong>9.97</strong></td><td>Historical v1.6.0 fresh-token contract passed; Codex-relative cost remains diagnostic</td></tr>
62
111
  </tbody>
63
112
  </table>
64
113
  </div>
65
114
  </section>
66
115
 
67
116
  <section class="section">
68
- <p class="section-kicker">Tokens and tools</p>
69
- <h2 id="tokens">Piagent uses less fresh context</h2>
70
- <p class="section-lead">The bars show independent medians across 54 runs per surface. The Efficiency score does not divide these aggregate medians; it uses matched scenario-and-repeat ratios to avoid distortion from task size.</p>
117
+ <p class="section-kicker">Primary token estimand</p>
118
+ <h2 id="tokens">Measure the fixed workload, not only successful tasks</h2>
119
+ <p class="section-lead"><code>fixed-workload-family-ratio</code> sums exact fresh tokens across the three repeats in each family for each surface, takes the Piagent/<code>codex-cli</code> ratio, then computes the geometric mean across 18 independent families. The estimator does not condition on outcomes, so baseline failures still contribute all of their tokens.</p>
120
+
121
+ <div class="benchmark-paired">
122
+ <div class="benchmark-paired-head">
123
+ <div><span>Primary family ratio</span><strong>0.3857 · 61.43% reduction</strong></div>
124
+ <div><span>95% family-clustered CI</span><strong>0.3073–0.4840</strong></div>
125
+ </div>
126
+ <p>The upper bound of 0.4840 corresponds to a conservative 51.60% reduction within this measurement. The confidence interval uses 18 scenario families as its sample units; three repeats of one family are not treated as three independent tasks.</p>
127
+ </div>
128
+
71
129
  <div class="benchmark-legend" aria-label="Chart legend">
72
130
  <span><i class="piagent-swatch"></i>Piagent</span>
73
131
  <span><i class="codex-swatch"></i>codex-cli</span>
74
132
  </div>
75
- <div class="benchmark-usage-chart" aria-label="Median usage comparison between Piagent and codex-cli">
76
- <div class="benchmark-usage-group">
77
- <h3>Fresh tokens</h3>
78
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.88%"></i></div><strong>7,368</strong></div>
79
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>18,476</strong></div>
80
- </div>
81
- <div class="benchmark-usage-group">
82
- <h3>Input excluding cache</h3>
83
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 48.98%"></i></div><strong>6,801</strong></div>
84
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>13,885</strong></div>
85
- </div>
86
- <div class="benchmark-usage-group">
87
- <h3>Output</h3>
88
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.71%"></i></div><strong>913</strong></div>
89
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>2,299</strong></div>
90
- </div>
133
+ <div class="benchmark-usage-chart" aria-label="Fresh-token totals across every accepted attempt: Piagent 421,119, codex-cli 951,172">
91
134
  <div class="benchmark-usage-group">
92
- <h3>Tool calls</h3>
93
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 62.5%"></i></div><strong>5</strong></div>
94
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>8</strong></div>
135
+ <h3>All-attempt fresh-token total · descriptive</h3>
136
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 44.27%"></i></div><strong>421,119</strong></div>
137
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>951,172</strong></div>
95
138
  </div>
96
139
  </div>
140
+
97
141
  <div class="table-wrap benchmark-table-wrap">
98
142
  <table>
99
- <thead><tr><th>Median per run</th><th>Piagent</th><th>codex-cli</th></tr></thead>
143
+ <thead><tr><th>Measurement</th><th>Piagent</th><th>codex-cli</th><th>Role</th></tr></thead>
100
144
  <tbody>
101
- <tr><td>Input excluding cache</td><td><strong>6,801</strong></td><td>13,885</td></tr>
102
- <tr><td>Output</td><td><strong>913</strong></td><td>2,299</td></tr>
103
- <tr><td>Cache read</td><td><strong>7,680</strong></td><td>78,208</td></tr>
104
- <tr><td>Reasoning included in output</td><td><strong>414</strong></td><td>592</td></tr>
105
- <tr><td>Fresh tokens</td><td><strong>7,368</strong></td><td>18,476</td></tr>
106
- <tr><td>Tool calls</td><td><strong>5</strong></td><td>8</td></tr>
107
- <tr><td>Cost</td><td><strong>$0.059141</strong></td><td>n/a from Codex OAuth JSONL</td></tr>
145
+ <tr><td>Resolved outcomes</td><td><strong>54/54</strong></td><td>48/54</td><td>Independent quality/continuity gate</td></tr>
146
+ <tr><td>All-attempt fresh tokens</td><td><strong>421,119</strong></td><td>951,172</td><td>Descriptive total, ratio 0.4427</td></tr>
147
+ <tr><td>Primary family ratio</td><td colspan="2"><strong>0.3857</strong> · 95% CI 0.3073–0.4840</td><td>Token-claim decision</td></tr>
148
+ <tr><td>Usage completeness</td><td colspan="2"><strong>108/108 exact · 0 retries</strong></td><td>Measurement-integrity gate</td></tr>
108
149
  </tbody>
109
150
  </table>
110
151
  </div>
111
- <div class="benchmark-paired">
112
- <div class="benchmark-paired-head">
113
- <div><span>Fresh-token pair wins</span><strong>47 Piagent · 7 codex-cli · 0 ties</strong></div>
114
- <div><span>Median paired delta</span><strong>-7,870 tokens</strong></div>
115
- </div>
116
- <div class="benchmark-win-track" role="img" aria-label="Piagent won 47 of 54 pairs and codex-cli won 7">
117
- <i class="piagent-win" style="--bar-size: 87.04%"></i>
118
- <i class="codex-win" style="--bar-size: 12.96%"></i>
119
- </div>
120
- <p>Paired geometric mean ratio: <strong>0.4889</strong>. The 95% confidence interval is <strong>0.3809–0.6276</strong>, whose upper bound remains below the 1.0 baseline, so the token-saving claim is allowed. Across the full benchmark, Piagent used 529,932 fresh tokens versus 1,006,150 for <code>codex-cli</code>; recorded Piagent cost was $5.321.</p>
152
+
153
+ <div class="callout">
154
+ <strong>Do not replace the primary estimator by dividing the two totals.</strong>
155
+ <p>The aggregate ratio of 0.4427 describes workload scale only. The 61.43% claim comes from the predeclared fixed-workload family ratio of 0.3857 so that one large family cannot overwhelm the other 17.</p>
121
156
  </div>
122
157
  </section>
123
158
 
@@ -125,12 +160,12 @@
125
160
  <p class="section-kicker">Coverage</p>
126
161
  <h2 id="coverage">Six domains with three families each</h2>
127
162
  <div class="benchmark-categories">
128
- <div><span>Backend</span><strong>10.00</strong><p>Authorization, money rounding, cache isolation</p></div>
129
- <div><span>Frontend</span><strong>10.00</strong><p>Async response, Unicode search, pagination</p></div>
130
- <div><span>Data</span><strong>10.00</strong><p>Quoted CSV, stable deduplication, schema migration</p></div>
131
- <div><span>Platform</span><strong>10.00</strong><p>Config precedence, CLI parsing, workspace order</p></div>
132
- <div><span>Reliability</span><strong>10.00</strong><p>Bounded retry, expiry, incident diagnosis</p></div>
133
- <div><span>Security</span><strong>10.00</strong><p>Secret refusal, prompt injection, audit history</p></div>
163
+ <div><span>Backend</span><strong>3 families</strong><p>Authorization, money rounding, cache isolation</p></div>
164
+ <div><span>Frontend</span><strong>3 families</strong><p>Async response, Unicode search, pagination</p></div>
165
+ <div><span>Data</span><strong>3 families</strong><p>Quoted CSV, stable deduplication, schema migration</p></div>
166
+ <div><span>Platform</span><strong>3 families</strong><p>Config precedence, CLI parsing, workspace order</p></div>
167
+ <div><span>Reliability</span><strong>3 families</strong><p>Bounded retry, expiry, incident diagnosis</p></div>
168
+ <div><span>Security</span><strong>3 families</strong><p>Secret refusal, prompt injection, audit history</p></div>
134
169
  </div>
135
170
  </section>
136
171
 
@@ -142,15 +177,15 @@
142
177
  <thead><tr><th>Band</th><th>When to use it</th><th>Minimum evidence</th><th>Claim allowed</th></tr></thead>
143
178
  <tbody>
144
179
  <tr><td>Core</td><td>Fast local smoke before release work</td><td>4 scenarios, 1 repeat, hidden verifier</td><td>Regression only</td></tr>
145
- <tr><td>Production</td><td>Public regression for a release candidate</td><td>18 scenarios, 3 repeats, <span class="inline-code">piagent</span> vs baseline</td><td>Claims stay bounded to the observed public suite; outcome coverage, comparable CI, and failure-aware effort are separate</td></tr>
146
- <tr><td>Capability</td><td>Find the harness capability ceiling</td><td>4 large multi-file/multi-component tasks with reference and mutation checks</td><td>Hill-climbing, not a release or generalization gate</td></tr>
147
- <tr><td>Long-horizon</td><td>Recovery/context changes and large-repository adoption</td><td>Planned dedicated paid suite; today run Production plus deterministic crash/replay tests</td><td>No public long-horizon score until that suite ships</td></tr>
180
+ <tr><td>Production</td><td>Public regression for a release candidate</td><td>18 families, 3 repeats, fixed workload, exact accounting</td><td>Only within the observed public suite when quality and continuity also pass</td></tr>
181
+ <tr><td>Capability</td><td>Find the harness capability ceiling</td><td>Large multi-file/multi-component tasks with reference and mutation checks</td><td>Hill-climbing, not a release or generalization gate</td></tr>
182
+ <tr><td>Long-horizon</td><td>Recovery/context changes and large-repository adoption</td><td>A dedicated paid suite; deterministic crash/replay tests supplement it today</td><td>No public long-horizon score until the dedicated suite ships</td></tr>
148
183
  </tbody>
149
184
  </table>
150
185
  </div>
151
186
  <div class="callout">
152
- <strong>A benchmark must state its claim tier; it is not marketing copy.</strong>
153
- <p>A version should not claim token savings unless quality/reliability, paired candidate-regression, outcome coverage, comparable-efficiency, failure-aware effort, scope/safety, and protocol gates pass. Raw Pi is a causal harness ablation; <code>codex-cli</code> is only an external product reference.</p>
187
+ <strong>“Production gate” does not mean “production stability proven.”</strong>
188
+ <p>It is the name of the synthetic public-regression release gate. It does not prove Piagent always saves exactly 61.43%, does not cover every repository, task, or model, and does not replace real shadow/canary tasks or long-term stability monitoring.</p>
154
189
  </div>
155
190
  </section>
156
191
 
@@ -160,25 +195,34 @@
160
195
  <div class="table-wrap benchmark-table-wrap">
161
196
  <table>
162
197
  <tbody>
163
- <tr><th>Run</th><td><code>production-v1-20260802T153320Z-11f3d0</code></td></tr>
164
- <tr><th>Suite digest</th><td><code>90a44ac4f5d4ec11772eac00f4f984d78c6962d116581ca29ab6b8760c8f9171</code></td></tr>
165
- <tr><th>Runtime</th><td>Pi 0.82.0 · <code>codex-cli 0.146.0-alpha.9.2</code> · Node 24.11.1</td></tr>
166
- <tr><th>Verdict</th><td><code>piagent-more-efficient</code> · every production gate passed</td></tr>
167
- <tr><th>Release mapping</th><td>Measured on the candidate before metadata bump; the same logic shipped as v1.2.12.</td></tr>
198
+ <tr><th>Release</th><td><code>v1.6.0</code> · <code>3bba8f0b3ff521bc2a355e1f6bef6d1bbdc09511</code></td></tr>
199
+ <tr><th>Run</th><td><code>production-v1-20260824T040017Z-05b7cf</code></td></tr>
200
+ <tr><th>Suite digest</th><td><code>308dc2f0a4656cb272421949a01972df2b0717b4ffeb564306ae12aa669ae6b8</code></td></tr>
201
+ <tr><th>Model</th><td>GPT-5.6 Luna · Medium · both surfaces</td></tr>
202
+ <tr><th>Verdict</th><td><code>historical v1.6.0 gate: pass</code> · <code>Codex-relative cost: diagnostic only</code></td></tr>
203
+ <tr><th>Public artifact</th><td>Reviewed aggregates only; no report, seed, local path, or session identity is published.</td></tr>
168
204
  </tbody>
169
205
  </table>
170
206
  </div>
207
+
171
208
  <div class="callout">
172
209
  <strong>Limits of the conclusion</strong>
173
- <p>This is a maintainer-built public synthetic regression, not an independent benchmark proving Piagent is better for every repository or model. Generated values do not create independent task families. Generalization requires an external family-disjoint holdout, a reference/mutation/human-calibration manifest, a frozen candidate, and real shadow/canary tasks.</p>
210
+ <p>This is a maintainer-built synthetic public regression, not an independent benchmark, and it does not permit a generalization claim. It does not prove Piagent wins every family or session, does not measure long-term production stability, and is not a claim about subscription spend, provider-billed cost, or wall-clock speed. Total traffic and API-equivalent cost may become a hard gate only in a future suite version with exact per-request pricing evidence; this historical run cannot be relabeled.</p>
174
211
  </div>
212
+
175
213
  <div class="command-grid">
176
214
  <div class="command-card">
177
- <header><span>Run the production benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --production --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-sol --thinking xhigh">Copy</button></header>
215
+ <header><span>Run the production benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --production --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-luna --thinking medium">Copy</button></header>
178
216
  <pre><code>piagent-benchmark --production \
179
217
  --surfaces piagent,codex-cli \
180
- --model openai-codex/gpt-5.6-sol \
181
- --thinking xhigh</code></pre>
218
+ --model openai-codex/gpt-5.6-luna \
219
+ --thinking medium</code></pre>
182
220
  </div>
183
221
  </div>
184
222
  </section>
223
+
224
+ <section class="section">
225
+ <p class="section-kicker">Historical snapshot</p>
226
+ <h2 id="historical-v1-2-12">v1.2.12 remains historical evidence</h2>
227
+ <p>Snapshot <code>production-v1-20260802T153320Z-11f3d0</code> used GPT-5.6 Sol/xhigh, resolved 54/54 Piagent tasks, and reported a paired successful-outcome ratio of 0.4889 with a 95% CI of 0.3809–0.6276. It predates the fixed-workload S108 contract and ran on a dirty source tree, so it remains historical observational evidence and cannot be relabeled as a v1.6.0 or current-contract claim.</p>
228
+ </section>
@@ -19,30 +19,30 @@
19
19
  </section>
20
20
 
21
21
  <section class="section">
22
- <p class="section-kicker">Production V1 · historical public regression evidence</p>
22
+ <p class="section-kicker">Production V1 · v1.6.0 public regression evidence</p>
23
23
  <h2 id="evidence">Measured, not asserted</h2>
24
- <p class="section-lead">108 sessions on the same model and thinking level, graded automatically, against an isolated <code>codex-cli</code> surface. This is the production-v1 measurement; it is not a re-measurement of v1.4.0.</p>
24
+ <p class="section-lead">Release-bound run <code>production-v1-20260824T040017Z-05b7cf</code> measured 108 sessions on GPT-5.6 Luna Medium at tag <code>v1.6.0</code>, exact commit <code>3bba8f0b3ff521bc2a355e1f6bef6d1bbdc09511</code>, with Piagent compared against <code>codex-cli</code>.</p>
25
25
 
26
26
  <div class="benchmark-metrics" aria-label="Headline benchmark numbers">
27
27
  <div class="benchmark-metric">
28
- <span>Overall</span>
29
- <strong>9.92 / 10</strong>
30
- <small>Quality, Safety, Reliability all 10/10</small>
28
+ <span>Release evidence</span>
29
+ <strong>v1.6.0</strong>
30
+ <small>exact commit 3bba8f0</small>
31
31
  </div>
32
32
  <div class="benchmark-metric">
33
33
  <span>Tasks resolved</span>
34
34
  <strong>54/54</strong>
35
- <small>100% on both surfaces</small>
35
+ <small>Piagent; codex-cli resolved 48/54</small>
36
36
  </div>
37
37
  <div class="benchmark-metric">
38
38
  <span>Fresh tokens</span>
39
- <strong>-51.11%</strong>
40
- <small>paired geometric mean, 47/54 pair wins</small>
39
+ <strong>-61.43%</strong>
40
+ <small>primary fixed-workload family ratio 0.3857</small>
41
41
  </div>
42
42
  <div class="benchmark-metric">
43
- <span>Infrastructure</span>
44
- <strong>0 retries</strong>
45
- <small>108 valid runs</small>
43
+ <span>Usage evidence</span>
44
+ <strong>108/108 exact</strong>
45
+ <small>zero retries</small>
46
46
  </div>
47
47
  </div>
48
48
 
@@ -51,20 +51,20 @@
51
51
  <span><i class="codex-swatch"></i>codex-cli</span>
52
52
  </div>
53
53
 
54
- <div class="benchmark-usage-chart" aria-label="Median fresh tokens per run: Piagent 7,368, codex-cli 18,476">
54
+ <div class="benchmark-usage-chart" aria-label="Fixed-workload family fresh-token ratio: Piagent 38.57 percent, codex-cli baseline 100 percent; tasks resolved: Piagent 54 of 54, codex-cli 48 of 54">
55
55
  <div class="benchmark-usage-group">
56
- <h3>Fresh tokens, median per run</h3>
57
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.88%"></i></div><strong>7,368</strong></div>
58
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>18,476</strong></div>
56
+ <h3>Fixed-workload family fresh-token ratio</h3>
57
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 38.57%"></i></div><strong>0.3857</strong></div>
58
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>1.0000</strong></div>
59
59
  </div>
60
60
  <div class="benchmark-usage-group">
61
- <h3>Tool calls, median per run</h3>
62
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 62.5%"></i></div><strong>5</strong></div>
63
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>8</strong></div>
61
+ <h3>Tasks resolved</h3>
62
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 100%"></i></div><strong>54/54</strong></div>
63
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 88.89%"></i></div><strong>48/54</strong></div>
64
64
  </div>
65
65
  </div>
66
66
 
67
- <p>The 95% confidence interval on the paired ratio is <strong>0.3809–0.6276</strong>; the upper bound stays below 1.0, so the token-saving claim holds. <a href="/en/benchmark">See the full configuration, every band score, and the raw tables</a>.</p>
67
+ <p>The primary fixed-workload family ratio is <strong>0.3857</strong>, with a 95% confidence interval of <strong>0.3073–0.4840</strong>. The point estimate is 61.43% lower, while the upper confidence bound supports the conservative statement that Piagent used at least 51.60% fewer fresh tokens on this predeclared production-v1 workload and exact release. Usage was exact for all 108 sessions and no retry occurred. <a href="/en/benchmark">See the benchmark methodology and evidence boundary</a>.</p>
68
68
  </section>
69
69
 
70
70
  <section class="section">
@@ -11,11 +11,11 @@ piagent-install --version vX.Y.Z --resolve-tag</code></pre></article>
11
11
  <article class="command-card"><header><span>Doctor</span><button class="clip-btn" data-clip="piagent-doctor /path/to/project">Copy</button></header><pre><code>piagent-doctor /path/to/project</code></pre></article>
12
12
  <article class="command-card"><header><span>Smoke benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --dry-run&#10;piagent-benchmark">Copy</button></header><pre><code>piagent-benchmark --dry-run
13
13
  piagent-benchmark</code></pre></article>
14
- <article class="command-card"><header><span>Production benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --production --dry-run&#10;piagent-benchmark --production --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-sol --thinking xhigh">Copy</button></header><pre><code>piagent-benchmark --production --dry-run
14
+ <article class="command-card"><header><span>Production benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --production --dry-run&#10;piagent-benchmark --production --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-luna --thinking medium">Copy</button></header><pre><code>piagent-benchmark --production --dry-run
15
15
  piagent-benchmark --production --surfaces piagent,codex-cli \
16
- --model openai-codex/gpt-5.6-sol --thinking xhigh</code></pre></article>
17
- <article class="command-card"><header><span>Compare codex-cli</span><button class="clip-btn" data-clip="piagent-benchmark --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-sol --thinking xhigh">Copy</button></header><pre><code>piagent-benchmark --surfaces piagent,codex-cli \
18
- --model openai-codex/gpt-5.6-sol --thinking xhigh</code></pre></article>
16
+ --model openai-codex/gpt-5.6-luna --thinking medium</code></pre></article>
17
+ <article class="command-card"><header><span>Compare codex-cli</span><button class="clip-btn" data-clip="piagent-benchmark --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-luna --thinking medium">Copy</button></header><pre><code>piagent-benchmark --surfaces piagent,codex-cli \
18
+ --model openai-codex/gpt-5.6-luna --thinking medium</code></pre></article>
19
19
  <article class="command-card"><header><span>Trusted run</span><button class="clip-btn" data-clip="piagent-auto --full-access -p &quot;Run the trusted local benchmark suite.&quot;">Copy</button></header><pre><code>piagent-auto --read-only -p "Scout payment mapping. Do not edit source."
20
20
  piagent-auto --full-access -p "Run the trusted local benchmark suite."</code></pre></article>
21
21
  <article class="command-card"><header><span>Capabilities</span><button class="clip-btn" data-clip="piagent-capabilities catalog --check&#10;piagent-capabilities doctor --profile .pi/piagent-profile.json">Copy</button></header><pre><code>piagent-capabilities catalog --check
@@ -1,3 +1,14 @@
1
+ <section class="section">
2
+ <p class="section-kicker">v1.6.1 · Reliability patch</p>
3
+ <h2 id="v1-6-1">Truthful UI state, safe external review, and lower helper overhead</h2>
4
+ <p class="section-lead">This patch keeps the selected model and thinking level unchanged while tightening lifecycle truth, limiting helper expansion, and granting external-source reads only to the exact checkout for the current session.</p>
5
+ <div class="grid cols-3">
6
+ <article class="card"><h3 id="conversation-truth">Conversation truth</h3><p>Drafts, retries, and pending completion stay in Activity. Chat preserves user-then-assistant order and clears processing only at the real terminal boundary.</p></article>
7
+ <article class="card"><h3 id="external-review">External review</h3><p>GitHub, GitLab, and Bitbucket references activate only minimal source checkout. The runtime grants reads to that exact tree while blocking caches, credentials, symlink escape, and every mutation path.</p></article>
8
+ <article class="card"><h3 id="solo-first">Solo-first</h3><p>Direct subagent use is capped at one read-only helper with call, turn, and runtime budgets, no automatic retry/fork/worker expansion, and truthful failure state when evidence is missing.</p></article>
9
+ </div>
10
+ </section>
11
+
1
12
  <section class="section">
2
13
  <p class="section-kicker">Product stabilization</p>
3
14
  <h2 id="main-changes">Six changes users will notice</h2>
@@ -71,7 +82,7 @@
71
82
  <tr><td>Solver</td><td><span class="inline-code">shadow</span></td><td>Evaluates routes without changing the parent model or taking control of the workflow.</td></tr>
72
83
  <tr><td>Phase tools</td><td><span class="inline-code">shadow</span></td><td>Computes projections; use <span class="inline-code">PIAGENT_PHASE_TOOLS=on</span> to apply phase-specific tool visibility.</td></tr>
73
84
  <tr><td>Recovery</td><td><span class="inline-code">on</span></td><td>Retries or repairs within ceilings; use <span class="inline-code">PIAGENT_AUTO_RECOVERY=off</span> to restore ordinary handoff.</td></tr>
74
- <tr><td>Helpers</td><td><span class="inline-code">recommend</span></td><td>Explains recommendations only; <span class="inline-code">PIAGENT_HELPERS_MODE=on</span> dispatches read-only roles only when an adapter is available.</td></tr>
85
+ <tr><td>Helpers</td><td><span class="inline-code">off</span></td><td>Explicit <span class="inline-code">PIAGENT_HELPERS_MODE=on</span> still allows only one fresh read-only helper after two independent lanes and at least 30% projected net saving are proven.</td></tr>
75
86
  <tr><td>Parent routing and automatic workers</td><td><span class="inline-code">off</span></td><td>No automatic parent-model switch, writer dispatch, or default multi-writer behavior.</td></tr>
76
87
  </tbody>
77
88
  </table>
@@ -64,8 +64,8 @@
64
64
  <p>There is no separate <span class="inline-code">/git</span> namespace. Use <span class="inline-code">/workflow commit</span> for a reviewed local commit and <span class="inline-code">/workflow pr</span> to prepare a pull request. Actions such as <span class="inline-code">git push</span> or broad staging with <span class="inline-code">git add -A</span> still require operator confirmation.</p>
65
65
  </div>
66
66
  <div class="callout">
67
- <strong>Solo-first orchestration</strong>
68
- <p>Use <span class="inline-code">/piagent-orchestration</span> to inspect mode, subagent limits, review lenses, Field Guide, and writer policy. The parent agent owns the task by default; subagents are used only when scouting, planning, or review has an independent lane worth the token cost.</p>
67
+ <strong>Parent-direct orchestration</strong>
68
+ <p>Use <span class="inline-code">/piagent-orchestration</span> to inspect the one-helper ceiling, dispatch/skip reason, projected token saving, review lenses, Field Guide, and writer policy. Helpers default to off. Explicit opt-in still permits only one fresh read-only helper when two independent lanes and at least 30% projected net saving are proven; workers and retries stay disabled.</p>
69
69
  </div>
70
70
  <div class="command-grid">
71
71
  <article class="command-card"><header><span>Bounded implementation</span><button class="clip-btn" data-clip="/workflow task Fix the failing checkout test and verify.">Copy</button></header><pre><code>/workflow task Fix the failing checkout test and verify.</code></pre></article>
@@ -19,30 +19,30 @@
19
19
  </section>
20
20
 
21
21
  <section class="section">
22
- <p class="section-kicker">Production V1 · historical public regression evidence</p>
22
+ <p class="section-kicker">Production V1 · bằng chứng public của v1.6.0</p>
23
23
  <h2 id="bang-chung">Đo được, không phải nói suông</h2>
24
- <p class="section-lead">108 session, cùng model và cùng thinking level, chấm tự động, so với surface <code>codex-cli</code> chạy cách ly. Đây là bằng chứng của bản đo production-v1, không phải phép đo lại của v1.4.0.</p>
24
+ <p class="section-lead">Run gắn với release <code>production-v1-20260824T040017Z-05b7cf</code> đã đo 108 session bằng GPT-5.6 Luna Medium tại tag <code>v1.6.0</code>, đúng commit <code>3bba8f0b3ff521bc2a355e1f6bef6d1bbdc09511</code>, với Piagent so với <code>codex-cli</code>.</p>
25
25
 
26
26
  <div class="benchmark-metrics" aria-label="Số liệu benchmark nổi bật">
27
27
  <div class="benchmark-metric">
28
- <span>Overall</span>
29
- <strong>9,92 / 10</strong>
30
- <small>Quality, Safety, Reliability đều 10/10</small>
28
+ <span>Bằng chứng release</span>
29
+ <strong>v1.6.0</strong>
30
+ <small>đúng commit 3bba8f0</small>
31
31
  </div>
32
32
  <div class="benchmark-metric">
33
33
  <span>Task resolved</span>
34
34
  <strong>54/54</strong>
35
- <small>100% cho cả hai surface</small>
35
+ <small>Piagent; codex-cli đạt 48/54</small>
36
36
  </div>
37
37
  <div class="benchmark-metric">
38
38
  <span>Fresh token</span>
39
- <strong>-51,11%</strong>
40
- <small>paired geometric mean, 47/54 cặp thắng</small>
39
+ <strong>-61,43%</strong>
40
+ <small>tỷ lệ family fixed-workload chính 0,3857</small>
41
41
  </div>
42
42
  <div class="benchmark-metric">
43
- <span>Infrastructure</span>
44
- <strong>0 retry</strong>
45
- <small>108 lần chạy hợp lệ</small>
43
+ <span>Bằng chứng usage</span>
44
+ <strong>108/108 exact</strong>
45
+ <small>không có retry</small>
46
46
  </div>
47
47
  </div>
48
48
 
@@ -51,20 +51,20 @@
51
51
  <span><i class="codex-swatch"></i>codex-cli</span>
52
52
  </div>
53
53
 
54
- <div class="benchmark-usage-chart" aria-label="Fresh token median mỗi run: Piagent 7.368, codex-cli 18.476">
54
+ <div class="benchmark-usage-chart" aria-label="Tỷ lệ fresh token theo family fixed-workload: Piagent 38,57 phần trăm, baseline codex-cli 100 phần trăm; task hoàn thành: Piagent 54 trên 54, codex-cli 48 trên 54">
55
55
  <div class="benchmark-usage-group">
56
- <h3>Fresh token, median mỗi run</h3>
57
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.88%"></i></div><strong>7.368</strong></div>
58
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>18.476</strong></div>
56
+ <h3>Tỷ lệ fresh token theo family fixed-workload</h3>
57
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 38.57%"></i></div><strong>0,3857</strong></div>
58
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>1,0000</strong></div>
59
59
  </div>
60
60
  <div class="benchmark-usage-group">
61
- <h3>Tool calls, median mỗi run</h3>
62
- <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 62.5%"></i></div><strong>5</strong></div>
63
- <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>8</strong></div>
61
+ <h3>Task resolved</h3>
62
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 100%"></i></div><strong>54/54</strong></div>
63
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 88.89%"></i></div><strong>48/54</strong></div>
64
64
  </div>
65
65
  </div>
66
66
 
67
- <p>Khoảng tin cậy 95% của tỷ lệ ghép cặp là <strong>0,3809–0,6276</strong>; cận trên vẫn dưới 1,0 nên claim tiết kiệm token đứng vững. <a href="/benchmark">Xem đầy đủ cấu hình, từng band điểm và bảng số</a>.</p>
67
+ <p>Tỷ lệ family fixed-workload chính là <strong>0,3857</strong>, với khoảng tin cậy 95% <strong>0,3073–0,4840</strong>. Ước lượng điểm thấp hơn 61,43%; theo cận trên của khoảng tin cậy, có thể phát biểu thận trọng rằng Piagent dùng ít hơn ít nhất 51,60% fresh token trên đúng workload production-v1 đã khai báo trước và đúng release này. Usage của cả 108 session đều exact và không có retry. <a href="/benchmark">Xem phương pháp benchmark và ranh giới bằng chứng</a>.</p>
68
68
  </section>
69
69
 
70
70
  <section class="section">
@@ -31,15 +31,15 @@ piagent-install --version vX.Y.Z --resolve-tag</code></pre>
31
31
  piagent-benchmark</code></pre>
32
32
  </article>
33
33
  <article class="command-card">
34
- <header><span>Production benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --production --dry-run&#10;piagent-benchmark --production --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-sol --thinking xhigh">Lấy lệnh</button></header>
34
+ <header><span>Production benchmark</span><button class="clip-btn" data-clip="piagent-benchmark --production --dry-run&#10;piagent-benchmark --production --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-luna --thinking medium">Lấy lệnh</button></header>
35
35
  <pre><code>piagent-benchmark --production --dry-run
36
36
  piagent-benchmark --production --surfaces piagent,codex-cli \
37
- --model openai-codex/gpt-5.6-sol --thinking xhigh</code></pre>
37
+ --model openai-codex/gpt-5.6-luna --thinking medium</code></pre>
38
38
  </article>
39
39
  <article class="command-card">
40
- <header><span>Compare codex-cli</span><button class="clip-btn" data-clip="piagent-benchmark --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-sol --thinking xhigh">Lấy lệnh</button></header>
40
+ <header><span>Compare codex-cli</span><button class="clip-btn" data-clip="piagent-benchmark --surfaces piagent,codex-cli --model openai-codex/gpt-5.6-luna --thinking medium">Lấy lệnh</button></header>
41
41
  <pre><code>piagent-benchmark --surfaces piagent,codex-cli \
42
- --model openai-codex/gpt-5.6-sol --thinking xhigh</code></pre>
42
+ --model openai-codex/gpt-5.6-luna --thinking medium</code></pre>
43
43
  </article>
44
44
  <article class="command-card">
45
45
  <header><span>Trusted run</span><button class="clip-btn" data-clip="piagent-auto --full-access -p &quot;Run the trusted local benchmark suite.&quot;">Lấy lệnh</button></header>