@piagent/platform 1.6.0 → 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 (213) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +17 -14
  3. package/README.vi.md +26 -1
  4. package/benchmarks/production-v1/spend-control.v1.json +27 -3
  5. package/benchmarks/production-v1/suite.json +5 -1
  6. package/catalog/capabilities.json +16 -16
  7. package/docs/authority-manifest.md +1 -1
  8. package/docs/auto-delegation-policy.md +38 -73
  9. package/docs/command-reference-vietnamese.md +23 -31
  10. package/docs/context-engine.md +5 -3
  11. package/docs/context-window-policy.md +37 -1
  12. package/docs/distribution-standard.md +7 -7
  13. package/docs/en/architecture.md +26 -13
  14. package/docs/languages.json +4 -4
  15. package/docs/operator-manual-vietnamese.md +21 -41
  16. package/docs/publishing-for-teams.md +5 -0
  17. package/docs/quality-benchmark.md +179 -23
  18. package/docs/release-install-policy.md +6 -6
  19. package/docs/runtime-harness-standard.md +3 -3
  20. package/docs/security-threat-model.md +1 -1
  21. package/docs/subagent-orchestration-capabilities.md +19 -51
  22. package/docs/subagents-and-multiagent.md +21 -47
  23. package/docs/task-implementation-contract.md +3 -3
  24. package/docs/task-lifecycle-vietnamese.md +1 -1
  25. package/docs/team-onboarding.md +2 -2
  26. package/docs/vi/architecture.md +26 -13
  27. package/docs-site/architecture.html +1 -1
  28. package/docs-site/benchmark.html +89 -95
  29. package/docs-site/commands.html +1 -1
  30. package/docs-site/content/benchmark.html +88 -94
  31. package/docs-site/content/en/benchmark.html +134 -90
  32. package/docs-site/content/en/index.html +19 -19
  33. package/docs-site/content/en/runtime.html +4 -4
  34. package/docs-site/content/en/whats-new.html +12 -1
  35. package/docs-site/content/en/workflows.html +2 -2
  36. package/docs-site/content/index.html +19 -19
  37. package/docs-site/content/runtime.html +4 -4
  38. package/docs-site/content/whats-new.html +12 -1
  39. package/docs-site/content/workflows.html +2 -2
  40. package/docs-site/context-engine.html +1 -1
  41. package/docs-site/en/architecture.html +1 -1
  42. package/docs-site/en/benchmark.html +135 -91
  43. package/docs-site/en/commands.html +1 -1
  44. package/docs-site/en/context-engine.html +1 -1
  45. package/docs-site/en/index.html +20 -20
  46. package/docs-site/en/mcp-approval.html +1 -1
  47. package/docs-site/en/mcp-auth.html +1 -1
  48. package/docs-site/en/mcp-servers.html +1 -1
  49. package/docs-site/en/mcp.html +1 -1
  50. package/docs-site/en/permissions.html +1 -1
  51. package/docs-site/en/profiles.html +1 -1
  52. package/docs-site/en/quickstart.html +1 -1
  53. package/docs-site/en/runtime.html +5 -5
  54. package/docs-site/en/scope.html +1 -1
  55. package/docs-site/en/security.html +1 -1
  56. package/docs-site/en/team.html +1 -1
  57. package/docs-site/en/whats-new.html +13 -2
  58. package/docs-site/en/workflows.html +3 -3
  59. package/docs-site/index.html +20 -20
  60. package/docs-site/mcp-approval.html +1 -1
  61. package/docs-site/mcp-auth.html +1 -1
  62. package/docs-site/mcp-servers.html +1 -1
  63. package/docs-site/mcp.html +1 -1
  64. package/docs-site/permissions.html +1 -1
  65. package/docs-site/profiles.html +1 -1
  66. package/docs-site/quickstart.html +1 -1
  67. package/docs-site/runtime.html +5 -5
  68. package/docs-site/scope.html +1 -1
  69. package/docs-site/security.html +1 -1
  70. package/docs-site/team.html +1 -1
  71. package/docs-site/whats-new.html +13 -2
  72. package/docs-site/workflows.html +3 -3
  73. package/evals/fixtures/benchmark-assurance-evidence.invalid.json +1 -1
  74. package/evals/fixtures/benchmark-assurance-evidence.valid.json +1 -1
  75. package/evals/fixtures/codex-relative-efficiency-v1.invalid.json +4 -0
  76. package/evals/fixtures/codex-relative-efficiency-v1.valid.json +94 -0
  77. package/evals/fixtures/helper-request.invalid.json +1 -1
  78. package/evals/fixtures/helper-request.valid.json +1 -1
  79. package/evals/fixtures/piagent-webui/subagent-tree-v1.valid.json +7 -0
  80. package/evals/fixtures/task-authority-snapshot.valid.json +4 -4
  81. package/evals/fs4-readiness-matrix.v1.json +2 -2
  82. package/evals/fs5-causal-arm.v1.json +2 -2
  83. package/evals/fs5-pilot-protocol.v1.json +3 -3
  84. package/evals/fs5-pilot-protocol.v2.json +8 -8
  85. package/evals/fs5-pilot-protocol.v3.json +8 -8
  86. package/evals/fs5-pilot-protocol.v4.json +6 -6
  87. package/evals/fs5-pilot-protocol.v5.json +7 -6
  88. package/evals/private-holdout-v1/public-exposure.v1.json +1 -1
  89. package/evals/runtime-conformance-v1/README.md +43 -0
  90. package/evals/runtime-conformance-v1/evaluate-paid-canary.mjs +198 -0
  91. package/evals/runtime-conformance-v1/lane.json +57 -0
  92. package/evals/runtime-conformance-v1/paid-canary.json +31 -0
  93. package/evals/runtime-conformance-v1/runner.mjs +456 -0
  94. package/package.json +1 -1
  95. package/packages/piagent-core/README.md +13 -4
  96. package/packages/piagent-core/benchmark/benchmark-codex-relative-efficiency.js +698 -0
  97. package/packages/piagent-core/benchmark/benchmark-core.js +4 -3
  98. package/packages/piagent-core/benchmark/benchmark-forensics.js +4 -2
  99. package/packages/piagent-core/benchmark/benchmark-preflight.js +3 -1
  100. package/packages/piagent-core/benchmark/benchmark-provider-free-evidence.js +345 -0
  101. package/packages/piagent-core/benchmark/benchmark-record-validation.js +74 -5
  102. package/packages/piagent-core/benchmark/benchmark-report.js +15 -1
  103. package/packages/piagent-core/benchmark/benchmark-runtime-causal.js +244 -0
  104. package/packages/piagent-core/benchmark/benchmark-stage-diagnostic.js +201 -4
  105. package/packages/piagent-core/benchmark/benchmark-suite.js +22 -1
  106. package/packages/piagent-core/benchmark/benchmark-summary-support.js +4 -0
  107. package/packages/piagent-core/benchmark/benchmark-usage.js +15 -4
  108. package/packages/piagent-core/capabilities/runtime-integrity.js +3 -0
  109. package/packages/piagent-core/extensions/acceptance-behavior-proof.js +806 -0
  110. package/packages/piagent-core/extensions/acceptance-receipt.js +89 -48
  111. package/packages/piagent-core/extensions/context-engine.js +1 -11
  112. package/packages/piagent-core/extensions/context-index-policy.js +4 -0
  113. package/packages/piagent-core/extensions/context-query-paths.js +57 -0
  114. package/packages/piagent-core/extensions/criterion-context-pack.js +16 -3
  115. package/packages/piagent-core/extensions/criterion-graph.js +4 -1
  116. package/packages/piagent-core/extensions/fallback-base-policy.ts +101 -0
  117. package/packages/piagent-core/extensions/guard-types.ts +4 -0
  118. package/packages/piagent-core/extensions/piagent-guard.ts +194 -226
  119. package/packages/piagent-core/extensions/task-lifecycle.js +32 -0
  120. package/packages/piagent-core/extensions/task-state.js +69 -8
  121. package/packages/piagent-core/extensions/verification-intelligence.js +49 -12
  122. package/packages/piagent-core/extensions/workspace-evidence-roots.js +52 -16
  123. package/packages/piagent-core/package.json +1 -1
  124. package/packages/piagent-core/policies/base-policy.json +42 -2
  125. package/packages/piagent-core/policy/authority-manifest.v1.json +3 -3
  126. package/packages/piagent-core/prompts/be-to-fe.md +2 -8
  127. package/packages/piagent-core/prompts/plan.md +1 -1
  128. package/packages/piagent-core/prompts/platform-improve.md +2 -6
  129. package/packages/piagent-core/prompts/review.md +2 -7
  130. package/packages/piagent-core/prompts/scout.md +1 -1
  131. package/packages/piagent-core/prompts/task.md +4 -3
  132. package/packages/piagent-core/runtime/hooks/completion-hook.ts +7 -6
  133. package/packages/piagent-core/runtime/hooks/input-hook.ts +6 -0
  134. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +100 -1
  135. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +58 -72
  136. package/packages/piagent-core/runtime/hooks/tool-result-value-helpers.ts +66 -0
  137. package/packages/piagent-core/runtime/inspection/bounded-emission-guard.ts +286 -0
  138. package/packages/piagent-core/runtime/inspection/runtime-event-store.ts +37 -7
  139. package/packages/piagent-core/runtime/inspection/task-subagent-tree.ts +27 -4
  140. package/packages/piagent-core/runtime/inspection/tool-failure-classification.ts +20 -3
  141. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +47 -11
  142. package/packages/piagent-core/runtime/orchestration/helper-lifecycle.ts +16 -12
  143. package/packages/piagent-core/runtime/orchestration/minimal-delegation-policy.ts +71 -0
  144. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +28 -20
  145. package/packages/piagent-core/runtime/orchestration/role-policy.ts +27 -9
  146. package/packages/piagent-core/runtime/orchestration/subagent-tool-policy.ts +329 -0
  147. package/packages/piagent-core/runtime/policy/block-remedy.ts +0 -4
  148. package/packages/piagent-core/runtime/product/efficiency-metrics.ts +3 -0
  149. package/packages/piagent-core/runtime/quality/edit-freshness-guard.ts +102 -0
  150. package/packages/piagent-core/runtime/quality/exact-output-contract.ts +20 -10
  151. package/packages/piagent-core/runtime/quality/performance-assurance.ts +3 -3
  152. package/packages/piagent-core/runtime/recovery/continuation-budget.ts +1 -1
  153. package/packages/piagent-core/runtime/recovery/handoff-projection.ts +4 -1
  154. package/packages/piagent-core/runtime/recovery/pristine-task-policy-refresh.ts +91 -0
  155. package/packages/piagent-core/runtime/recovery/recovery-policy.ts +7 -4
  156. package/packages/piagent-core/runtime/recovery/resume-state.ts +112 -14
  157. package/packages/piagent-core/runtime/recovery/semantic-repair-handshake.ts +7 -13
  158. package/packages/piagent-core/runtime/recovery/task-evidence-coverage-refresh.ts +217 -0
  159. package/packages/piagent-core/runtime/registration/context-commands.ts +16 -2
  160. package/packages/piagent-core/runtime/registration/knowledge-tools.ts +9 -5
  161. package/packages/piagent-core/runtime/registration/operator-request-intake.ts +49 -0
  162. package/packages/piagent-core/runtime/registration/policy-tools.ts +4 -4
  163. package/packages/piagent-core/runtime/registration/session-commands.ts +1 -1
  164. package/packages/piagent-core/runtime/registration/task-completion-tools.ts +12 -9
  165. package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +21 -12
  166. package/packages/piagent-core/runtime/registration/task-start-guidance.ts +19 -13
  167. package/packages/piagent-core/runtime/registration/task-start-manifest.ts +54 -0
  168. package/packages/piagent-core/runtime/registration/task-start-tool.ts +57 -57
  169. package/packages/piagent-core/runtime/runtime-limits.ts +16 -2
  170. package/packages/piagent-core/runtime/session/adaptive-context-analysis.ts +461 -0
  171. package/packages/piagent-core/runtime/session/adaptive-context-governor.ts +464 -0
  172. package/packages/piagent-core/runtime/session/adaptive-context-ledger.ts +265 -0
  173. package/packages/piagent-core/runtime/session/message-signals.ts +7 -3
  174. package/packages/piagent-core/runtime/session/operator-request-carry.ts +44 -0
  175. package/packages/piagent-core/runtime/session/runtime-state.ts +11 -7
  176. package/packages/piagent-core/runtime/session/source-checkout-read-grants.ts +35 -0
  177. package/packages/piagent-core/runtime/session/system-prompt.ts +76 -14
  178. package/packages/piagent-core/runtime/session/task-contract-presentation.ts +39 -0
  179. package/packages/piagent-core/runtime/tools/phase-tools.ts +8 -8
  180. package/packages/piagent-core/runtime/tools/tool-groups.ts +12 -2
  181. package/packages/piagent-core/runtime/verification/exact-verifier-reuse.ts +101 -0
  182. package/packages/piagent-core/runtime/workflows/runtime-intake-compaction.ts +164 -0
  183. package/packages/piagent-core/runtime/workflows/task-intake.ts +167 -39
  184. package/packages/piagent-core/subagents/piagent-oracle.md +5 -3
  185. package/packages/piagent-core/subagents/piagent-planner.md +6 -4
  186. package/packages/piagent-core/subagents/piagent-reviewer.md +5 -3
  187. package/packages/piagent-core/subagents/piagent-scout.md +4 -2
  188. package/packages/piagent-core/subagents/piagent-worker.md +6 -4
  189. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-CxeZqTte.js → MarkdownMessage-B4XehTCU.js} +1 -1
  190. package/packages/piagent-webui/dist/client/assets/{index-DynIMe8I.js → index-CgOEyRPG.js} +4 -4
  191. package/packages/piagent-webui/dist/client/index.html +1 -1
  192. package/packages/piagent-webui/extension/piagent-webui.ts +3 -1
  193. package/packages/piagent-webui/extension/same-session-bridge.ts +1 -1
  194. package/packages/piagent-webui/extension/session-stream-adapter.ts +33 -10
  195. package/packages/piagent-webui/gateway/gateway-session-stream.ts +37 -21
  196. package/packages/piagent-webui/gateway/session-operation-lifecycle.ts +237 -0
  197. package/packages/piagent-webui/gateway/session-operation-retry-control.ts +38 -0
  198. package/packages/piagent-webui/gateway/session-operation-watchdog.ts +9 -2
  199. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +8 -7
  200. package/packages/piagent-webui/ownership/session-lease-store.ts +5 -2
  201. package/packages/piagent-webui/server/core-inspection-provider.ts +2 -1
  202. package/packages/piagent-webui/server/transcript-projection.ts +91 -5
  203. package/schemas/codex-relative-efficiency-v1.schema.json +155 -0
  204. package/schemas/piagent-webui/runtime-event-v2.schema.json +15 -5
  205. package/schemas/piagent-webui/subagent-tree-v1.schema.json +11 -1
  206. package/schemas/project-profile.schema.json +1 -1
  207. package/schemas/task-contract.schema.json +15 -0
  208. package/scripts/benchmark-runner-core.mjs +14 -6
  209. package/scripts/benchmark-runner-finalization.mjs +4 -0
  210. package/scripts/configure-subagents.sh +42 -34
  211. package/scripts/helper-evaluation.mjs +1 -1
  212. package/scripts/team-doctor.sh +1 -1
  213. package/scripts/verify-local.sh +5 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,55 @@ This file records release-facing changes for Pi Agent Platform. Copy the relevan
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## v1.6.1 - 2026-08-26
8
+
9
+ ### Runtime continuity and truthful WebUI state
10
+
11
+ - Kept queued same-session work under one operation identity and prevented a
12
+ pending durable task from emitting a completed message or a success bubble.
13
+ Final-looking drafts remain hidden until the task reaches a terminal state,
14
+ preserving user-message then assistant-response ordering without a stale
15
+ processing indicator.
16
+ - Reconciled Activity from canonical tool evidence. Handled multi-target search
17
+ warnings finish normally, nested result envelopes are classified correctly,
18
+ and rejected or evidence-free helper calls remain visible as failures instead
19
+ of later replaying as passed.
20
+ - Captured the latest real operator request for model-owned task startup while
21
+ bounding and redacting the durable copy, so attachments and workflow wrappers
22
+ no longer replace the user's actual intent.
23
+
24
+ ### Safe external source review
25
+
26
+ - Detects GitHub, GitLab and Bitbucket references and activates only the minimal
27
+ source-checkout surface needed for a review. A successful checkout grants
28
+ session-scoped read access to that exact canonical tree, with an eight-source
29
+ bound and automatic cleanup at session end.
30
+ - Preserved protections around shared caches, sibling paths, symlink escape,
31
+ credentials, `.env`, `.git` and all mutation paths. Read-only inspection may
32
+ use bounded `read`, `grep`, `find` and `ls` flows without widening the project
33
+ mutation contract.
34
+
35
+ ### Solo-first cost and context controls
36
+
37
+ - Added direct subagent preflight with a one-helper ceiling, bounded calls,
38
+ turns and runtime, read-only role enforcement, no automatic retry/fork/worker
39
+ expansion, and truthful durable helper usage. Repeated helper results are
40
+ compacted without changing the model or thinking level.
41
+ - Hardened adaptive context accounting, exact verifier reuse, task-evidence
42
+ refresh and bounded runtime emission so token-saving decisions fail closed
43
+ when evidence is incomplete and cannot be relabeled as a Codex-relative cost
44
+ claim.
45
+
46
+ ### Benchmark assurance
47
+
48
+ - Added provider-free runtime-conformance and Codex-relative efficiency gates,
49
+ bound token/cost evidence to exact workload and provider attempts, and kept
50
+ the historical v1.6.0 production result explicitly separate from any new
51
+ subscription-spend or 30–40% cost claim.
52
+ - Preserved the 108-session production gate as an operator-authorized quota
53
+ step; this release ships runtime and benchmark safeguards without claiming a
54
+ new provider-backed result.
55
+
7
56
  ## v1.6.0 - 2026-08-24
8
57
 
9
58
  ### Context efficiency and source safety
package/README.md CHANGED
@@ -121,14 +121,17 @@ Removal targets what is registered in Pi's settings rather than what the current
121
121
  full-suite, and zero-retry gates. A separate provider-free WebUI
122
122
  parity gate proves the 10 workflow and 32 runtime-control paths before any
123
123
  model quota is used.
124
- - The v1.2.12 production snapshot resolved 54/54 Piagent tasks, scored 10.00 for
125
- quality/safety/reliability, 9.58 for workflow, 10.00 for efficiency, and 9.92
126
- overall. Against controlled `codex-cli` on the same `gpt-5.6-sol`/`xhigh`
127
- matrix, Piagent used 51.11% fewer paired fresh tokens with a 95% ratio interval
128
- of `0.3809..0.6276`; see the [benchmark evidence](https://piagent.io.vn/benchmark)
129
- and [methodology](docs/quality-benchmark.md). This is immutable historical
130
- evidence; current production gates additionally require every task and score
131
- band to exceed 9.5, so aggregate 9.58 alone is no longer sufficient.
124
+ - The public `v1.6.0` production-v1 run
125
+ `production-v1-20260824T040017Z-05b7cf`, on exact commit
126
+ `3bba8f0b3ff521bc2a355e1f6bef6d1bbdc09511` with GPT-5.6 Luna Medium,
127
+ measured 108 sessions. Piagent resolved 54/54 tasks versus 48/54 for
128
+ `codex-cli`. Its primary fixed-workload family fresh-token ratio was `0.3857`
129
+ (61.43% lower), with a 95% interval of `0.3073..0.4840`; the upper bound
130
+ supports the conservative statement of at least 51.60% fewer fresh tokens on
131
+ this predeclared workload and exact release. Usage was exact for all 108
132
+ sessions and no retry occurred. See the
133
+ [benchmark evidence](https://piagent.io.vn/benchmark) and
134
+ [methodology](docs/quality-benchmark.md).
132
135
  - Built-in profiles for frontend, backend, fullstack, BE-readonly/FE-write, data, DevOps, mobile, docs, Python, and Node TypeScript.
133
136
  - Versioned capability packs with deterministic catalog, profile resolution, integrity lock, and permission checks.
134
137
 
@@ -157,9 +160,9 @@ Inside an active Pi session, use `/permission` for the menu or a session-local s
157
160
 
158
161
  Legacy aliases still work: `/permission-status`, `/read-only`, `/workspace-write`, and `/full-access`. Full-access also accepts a task after the command. The guard switches the current session to `trusted-full-access`, then forwards the remaining text as the next user request.
159
162
 
160
- ## Solo-first orchestration
163
+ ## Parent-direct orchestration
161
164
 
162
- Pi Agent Platform supports subagents, but the default operating model is solo-first: one parent agent owns the task contract, uses explicit review lenses, and only calls bounded subagents when scout/planning/review work is independent enough to justify the extra token/tool cost.
165
+ The parent model owns reasoning, implementation, and verification. Helpers are off by default. With explicit opt-in, runtime may dispatch one fresh read-only helper only when it proves two independent lanes and at least 30% projected net token saving after handoff and merge. Workers, retries, nested helpers, and parallel helpers remain disabled.
163
166
 
164
167
  Inside Pi:
165
168
 
@@ -167,7 +170,7 @@ Inside Pi:
167
170
  /piagent-orchestration
168
171
  ```
169
172
 
170
- This shows the active mode, max subagents, review lenses, Field Guide path, and writer policy without triggering a model follow-up.
173
+ This shows the active mode, one-helper ceiling, review lenses, Field Guide path, writer policy, and dispatch/skip evidence without triggering a model follow-up.
171
174
 
172
175
  For bounded source work, runtime creates the session-bound contract before the
173
176
  model starts and injects its path scope plus concise verifier. Broad, high-risk,
@@ -268,9 +271,9 @@ Keep provider keys in environment variables, never in committed config. Switchin
268
271
 
269
272
  ## Subagents
270
273
 
271
- `piagent-setup` installs `pi-subagents` with the `safe` preset and `pi-web-access` for web-backed researcher runs unless disabled. Daily task prompts stay solo-first: they delegate bounded scout, planning, research, and review work only when it is independent enough to be worth the cost, and the final handoff states whether subagents were used and why.
274
+ `piagent-setup` installs the optional `pi-subagents` compatibility runtime with a clamped `safe` preset. Daily tasks stay parent-direct; builtin agents and workers are disabled, and explicit helper mode still requires the measured 30% gate. The inspector states dispatch/skip reasons and projected saving.
272
275
 
273
- `/subagents-doctor` runs a health check; `/run piagent-scout "…"` and its planner, worker, and reviewer counterparts dispatch work. See [Subagents and multi-agent](docs/subagents-and-multiagent.md).
276
+ `/subagents-doctor` runs a health check. See [Subagents and multi-agent](docs/subagents-and-multiagent.md) for the one read-only helper opt-in contract.
274
277
 
275
278
  ## Repository layout
276
279
 
@@ -360,7 +363,7 @@ This repository intentionally excludes:
360
363
 
361
364
  ## Maturity
362
365
 
363
- The current package version is read from package metadata and release tags. Personal machines may follow the unpinned package source when accepting ongoing updates; production/team quickstarts and committed project settings should pin an explicit tag such as `v1.6.0` or a reviewed commit.
366
+ The current package version is read from package metadata and release tags. Personal machines may follow the unpinned package source when accepting ongoing updates; production/team quickstarts and committed project settings should pin an explicit tag such as `v1.6.1` or a reviewed commit.
364
367
 
365
368
  Ready for:
366
369
 
package/README.vi.md CHANGED
@@ -47,6 +47,20 @@ chưa ship solver hoặc automatic parent routing. Host execution là mặc đ
47
47
  yêu cầu isolation backend chưa có adapter, mutation bị block thay vì âm thầm
48
48
  fallback về host.
49
49
 
50
+ ## Điều phối parent-direct
51
+
52
+ Parent model tự sở hữu suy luận, implementation và verification. Helper mặc định
53
+ tắt. Khi operator chủ động bật, runtime chỉ được dispatch tối đa một helper
54
+ read-only dùng context fresh nếu chứng minh có hai lane độc lập và tổng token dự
55
+ kiến sau handoff/merge giảm ít nhất 30%. Worker, retry, nested helper và parallel
56
+ helper đều bị tắt.
57
+
58
+ Trong Pi, `/piagent-orchestration` hiển thị mode hiện tại, trần một helper,
59
+ review lens, writer policy và bằng chứng dispatch/skip mà không tạo model turn.
60
+ `piagent-setup` chỉ cài `pi-subagents` như runtime tương thích tùy chọn với preset
61
+ `safe` đã bị clamp; `/subagents-doctor` dùng để kiểm tra health. Chi tiết nằm tại
62
+ [Subagents và multi-agent](docs/subagents-and-multiagent.md).
63
+
50
64
  ## Web search và vision
51
65
 
52
66
  Web research và đọc ảnh là hai capability tách biệt. Tích hợp `pi-web-access`
@@ -166,9 +180,20 @@ token và duration gate, đồng thời không có retry. Retry diagnostic vẫn
166
180
  rõ nhưng làm release gate fail. `--dry-run` chỉ validate kế hoạch, không dùng
167
181
  quota.
168
182
 
183
+ Run production-v1 public của `v1.6.0`,
184
+ `production-v1-20260824T040017Z-05b7cf`, được đo trên đúng commit
185
+ `3bba8f0b3ff521bc2a355e1f6bef6d1bbdc09511` bằng GPT-5.6 Luna Medium với
186
+ 108 session. Piagent hoàn thành 54/54 task, so với 48/54 của `codex-cli`. Tỷ lệ
187
+ fresh token theo family fixed-workload chính là `0,3857` (thấp hơn 61,43%), với
188
+ khoảng tin cậy 95% `0,3073..0,4840`; cận trên cho phép phát biểu thận trọng rằng
189
+ Piagent dùng ít hơn ít nhất 51,60% fresh token trên đúng workload đã khai báo
190
+ trước và đúng release này. Usage của cả 108 session đều exact và không có retry.
191
+ Xem [bằng chứng benchmark](https://piagent.io.vn/benchmark) và
192
+ [phương pháp](docs/quality-benchmark.md).
193
+
169
194
  Gate này chạy architecture check, test, typecheck, capability validation, runtime smoke và docs consistency trước khi release.
170
195
 
171
- Bản phát hành hiện tại là `v1.6.0`. Với team hoặc production, hãy pin tag này
196
+ Bản phát hành hiện tại là `v1.6.1`. Với team hoặc production, hãy pin tag này
172
197
  hoặc một commit đã review thay vì dựa vào nguồn package không cố định.
173
198
 
174
199
  ## Security
@@ -31,6 +31,28 @@
31
31
  "requiredLifecycleCoverage": ["steady-state", "cold-start"],
32
32
  "requiredDifficultyCoverage": ["small", "medium", "large"]
33
33
  },
34
+ "productionGuards": {
35
+ "subagents": {
36
+ "required": true,
37
+ "maximumSessionsPerAttempt": 1,
38
+ "maximumTrafficShare": 0.05,
39
+ "requireExactAllAttemptEvidence": true,
40
+ "requireExplainedSessionCount": true
41
+ },
42
+ "partialFreshSpend": {
43
+ "requiredFromCumulativeSessions": 12,
44
+ "maximumPooledFreshRatio": 1.1,
45
+ "maximumObservedFamilyFreshRatio": 1.25,
46
+ "includeExactFailedAttempts": true
47
+ },
48
+ "providerFreeEvidence": {
49
+ "requiredBeforeFirstPaidSession": true,
50
+ "requiredLaneIds": ["runtime-conformance-v1", "long-horizon-v1", "webui-parity-v1"],
51
+ "requireCleanCommitAndTreeBinding": true,
52
+ "requireProductionConfigurationBinding": true,
53
+ "requireRunnerAndLaneConfigurationDigests": true
54
+ }
55
+ },
34
56
  "enforcement": {
35
57
  "runnerConsumesThisArtifact": true,
36
58
  "runnerBindsFrozenSeedAndExecution": true,
@@ -52,17 +74,19 @@
52
74
  "all-observed-piagent-outcomes-remain-above-the-release-floor",
53
75
  "no-model-thinking-or-provider-wire-parity-drift",
54
76
  "complete-privacy-safe-causal-context-receipt-with-closed-session-lifecycle",
77
+ "source-bound-provider-free-runtime-long-horizon-and-webui-parity-receipts",
78
+ "exact-subagent-budget-at-most-one-session-per-attempt-and-five-percent-traffic",
79
+ "partial-stage-pooled-fresh-ratio-at-most-1.10-and-every-observed-family-at-most-1.25",
55
80
  "no-accepted-usage-completeness-failure",
56
81
  "no-infrastructure-retry",
57
82
  "no-unknown-provider-attempt-usage"
58
83
  ],
59
84
  "nonBlockingDiagnostics": [
60
- "intermediate-fresh-token-ratios",
61
85
  "normalized-api-equivalent-text-token-cost",
62
86
  "duration",
63
87
  "host-load"
64
88
  ],
65
- "operatorRule": "The commands pass this artifact's frozen values explicitly. After every production-v1 pause, resume recomputes the provider-free quality and continuity gate from the accepted ledger. Intermediate token, cost, duration, and host-load measurements are diagnostic only; only the complete S108 ledger may decide the fresh-token claim."
89
+ "operatorRule": "The commands pass this artifact's frozen values explicitly. S0 binds clean-source runtime-conformance, long-horizon, and WebUI-parity receipts before paid work. Every partial paid stage from S12 onward hard-stops when pooled fresh traffic exceeds 1.10, any observed family exceeds 1.25, or exact subagent evidence exceeds one child session per attempt or 5% of candidate traffic. Cost, duration, and host load remain observational. Only the complete S108 ledger may decide the 0.60 upper-95 fresh-token claim."
66
90
  },
67
- "claimBoundary": "Only S108 may be evaluated for the production-v1 fresh-token public-regression claim; S0, S12, S36 and S72 are spend-control diagnostics. Duration, host load, and normalized cost are reported but cannot block or support this claim."
91
+ "claimBoundary": "Only S108 may be evaluated for the production-v1 0.60 upper-95 fresh-token public-regression claim. S12, S36 and S72 enforce catastrophic fresh-spend and subagent safety ceilings but cannot establish the claim. Duration, host load, and normalized cost are reported but cannot block or support this claim."
68
92
  }
@@ -65,7 +65,11 @@
65
65
  "requireHostReadinessForClaim": false,
66
66
  "requireFullSuiteForClaim": true,
67
67
  "requireStableProviderWireSurface": true,
68
- "requireCausalContextReceipt": true
68
+ "requireCausalContextReceipt": true,
69
+ "requireProviderFreeEvidence": true,
70
+ "requireSubagentBudget": true,
71
+ "maximumSubagentSessionsPerAttempt": 1,
72
+ "maximumSubagentTrafficShare": 0.05
69
73
  },
70
74
  "scenarios": [
71
75
  {
@@ -26,8 +26,8 @@
26
26
  "path": "evals/scenarios/capability-resolution.json"
27
27
  },
28
28
  {
29
- "byteSize": 6350,
30
- "digest": "sha256:3e0f3a94bd3a19df8c24c3e234078d6c3edc664b20a7a4838919450f4225ffca",
29
+ "byteSize": 7158,
30
+ "digest": "sha256:8edb1cce6716291c8ca642d3d2392c8f6c92e725ca502e93e06ab45abe541a79",
31
31
  "id": "base-policy",
32
32
  "kind": "policies",
33
33
  "path": "packages/piagent-core/policies/base-policy.json"
@@ -40,8 +40,8 @@
40
40
  "path": "packages/piagent-core/prompts/commit.md"
41
41
  },
42
42
  {
43
- "byteSize": 1605,
44
- "digest": "sha256:1c2ae0893f131ca0c519f0954845f2b4a8e61182360aac245134102dc3324643",
43
+ "byteSize": 1413,
44
+ "digest": "sha256:cb6e7bad1305c7b61d34489cbb5d066ca99855dcfc846dee1668d16d17be8a2b",
45
45
  "id": "plan",
46
46
  "kind": "prompts",
47
47
  "path": "packages/piagent-core/prompts/plan.md"
@@ -54,15 +54,15 @@
54
54
  "path": "packages/piagent-core/prompts/pr.md"
55
55
  },
56
56
  {
57
- "byteSize": 1314,
58
- "digest": "sha256:e1e9caf68957748bebf6ac2d6294905226b298b2734434db8341b35664794388",
57
+ "byteSize": 1375,
58
+ "digest": "sha256:bd474a18754c3ab835951d802158c5a19bd5e92f66cffd0dd6b560adcadb795d",
59
59
  "id": "review",
60
60
  "kind": "prompts",
61
61
  "path": "packages/piagent-core/prompts/review.md"
62
62
  },
63
63
  {
64
- "byteSize": 2371,
65
- "digest": "sha256:bfe8374f15e06d410eec7ab2c82f85ef011fc7d514a92f23720179b497910a44",
64
+ "byteSize": 2796,
65
+ "digest": "sha256:8f1552bac55dce1399f3e65cce0333205b2002cc37d4366d69e25b0b4d5f09f9",
66
66
  "id": "task",
67
67
  "kind": "prompts",
68
68
  "path": "packages/piagent-core/prompts/task.md"
@@ -82,29 +82,29 @@
82
82
  "path": "packages/piagent-core/skills/piagent-ops/SKILL.md"
83
83
  },
84
84
  {
85
- "byteSize": 2024,
86
- "digest": "sha256:9c6aa91663a6614b72a4fb8c6c4a07c07a466c0889fcfe45528ae3e3f62bac90",
85
+ "byteSize": 2223,
86
+ "digest": "sha256:18f865d816c5a5cee50bf3b2b407c23a2e67e1e92d929001a0f24c04d0c20e03",
87
87
  "id": "piagent-planner",
88
88
  "kind": "subagents",
89
89
  "path": "packages/piagent-core/subagents/piagent-planner.md"
90
90
  },
91
91
  {
92
- "byteSize": 1951,
93
- "digest": "sha256:6a02cbc7904ea6d8de64aa776ac21ccfbf3c9cc468c4c1c7650e08374ab9e949",
92
+ "byteSize": 2091,
93
+ "digest": "sha256:4e514d6480a618d610d4f520af93fa4e151ef60b42b30f5cf94da1a9c96d6ead",
94
94
  "id": "piagent-reviewer",
95
95
  "kind": "subagents",
96
96
  "path": "packages/piagent-core/subagents/piagent-reviewer.md"
97
97
  },
98
98
  {
99
- "byteSize": 1575,
100
- "digest": "sha256:ecd432c57c99783ab76844d0a35cccad377e4cd265674577742ded48ea3ffbb4",
99
+ "byteSize": 1714,
100
+ "digest": "sha256:37d9638bfbca8d50f86cbee3fee4db3ba9197bf06004d3a7bba08fc2f8249549",
101
101
  "id": "piagent-scout",
102
102
  "kind": "subagents",
103
103
  "path": "packages/piagent-core/subagents/piagent-scout.md"
104
104
  },
105
105
  {
106
- "byteSize": 2159,
107
- "digest": "sha256:3e0b7071c80f471fb7ea67f91477c1f5e6d3f2574db492c3a9fae6788374a95d",
106
+ "byteSize": 2210,
107
+ "digest": "sha256:aa18041470aae1a2b600cef1c09ddbfcd8b86e1efb6858c1f460e46292120e9d",
108
108
  "id": "piagent-worker",
109
109
  "kind": "subagents",
110
110
  "path": "packages/piagent-core/subagents/piagent-worker.md"
@@ -170,7 +170,7 @@ directory sibling, unresolved test, denied carrier, failed call, or successful
170
170
  no-op locks the opportunity and invalidates reusable review credit. A real
171
171
  mutation must be followed by the task's exact verifier on the new tree before
172
172
  completion. Retryable infrastructure failure may retry that verifier once on
173
- the same digest, and a high-confidence in-scope failure may open one final
173
+ the same digest, and a high-confidence evidence-backed failure may open one final
174
174
  mutation-bound correction inside the already consumed continuation. Every
175
175
  other failure, repeated signature, exhausted budget, stale/corrupt state, or
176
176
  unsupported semantic shape produces a deterministic handoff rather than a new
@@ -1,7 +1,7 @@
1
1
  # Solo-first orchestration policy
2
2
  <!-- language: vi; english-index: docs-site/content/en/workflows.html -->
3
3
 
4
- Mục tiêu: user không phải nhớ `/run`, `/parallel`, `/chain` cho workflow hằng ngày, nhưng platform cũng không tự biến mọi task thành swarm tốn token. Khi anh gõ `/workflow task`, `/workflow be-to-fe`, `/workflow platform-improve`, `/workflow plan`, hoặc `/workflow review`, parent agent đọc `piagent_orchestration_policy`, giữ mặc định **solo-first**, rồi chỉ dùng subagents nếu việc đó giúp giảm nhiễu context, tăng tốc read-heavy work, hoặc tăng chất lượng review. Alias cũ như `/task` vẫn giữ cùng policy.
4
+ Mục tiêu: parent model tự làm trọn task với đầy đủ năng lực. Helper không còn là phase mặc định để scout/plan/review; nó chỉ là một tối ưu token ngoại lệ. Piagent chỉ cho tối đa **một helper read-only, context fresh** khi runtime chứng minh có ít nhất hai lane độc lập và tổng token dự kiến sau handoff/merge giảm tối thiểu **30%**. Alias cũ như `/task` giữ cùng policy.
5
5
 
6
6
  Kiểm tra policy hiện tại trong Pi:
7
7
 
@@ -15,11 +15,11 @@ Slash command này chỉ hiện status compact, không gửi follow-up cho model
15
15
 
16
16
  Subagent không nên hiểu là “luôn tự sinh khi task lớn”. Hành vi đúng là:
17
17
 
18
- 1. Parent agent đánh giá task có phần việc độc lập không.
19
- 2. Nếu có và `pi-subagents`/subagent tool khả dụng, parent có thể tự spawn subagent.
20
- 3. Nếu không có tool/package, parent tiếp tục single-agent và ghi rõ `Subagents: unavailable/not used`.
21
- 4. User vẫn có thể gọi command trực tiếp khi muốn ép orchestration cụ thể.
22
- 5. Parallel read-only có thể dùng cho scout/review; parallel writers không phải default và cần approval + isolation.
18
+ 1. Parent làm trực tiếp nếu runtime chưa có bằng chứng định lượng.
19
+ 2. Helper chỉ đủ điều kiện khi có ít nhất hai workstream độc lập, helper không chờ output tiếp theo của parent, context transfer không quá 2.048 token, không inherit transcript, và tổng dự kiến tiết kiệm ít nhất 30%.
20
+ 3. Mỗi task run chỉ có một lần thử helper. Lỗi runtime/scope xác định không được relaunch.
21
+ 4. Helper luôn read-only; worker/writer helper bị tắt. Parent giữ toàn bộ mutation và quyết định.
22
+ 5. UI/telemetry phải ghi `dispatch` hoặc `skip`, reason codes, và projected net saving; không có số liệu thì `skip`.
23
23
 
24
24
  Nếu bundled skill `pi-subagents` có trong skill list của parent, parent nên dùng skill đó cho orchestration patterns thay vì tự đoán syntax. Skill này là parent-only; child subagents không nhận nó.
25
25
 
@@ -28,43 +28,45 @@ Nếu bundled skill `pi-subagents` có trong skill list của parent, parent nê
28
28
  | Setting | Default |
29
29
  |---|---|
30
30
  | Mode | `solo-first` |
31
- | Max concurrent subagents | `2` |
31
+ | Helper budget | `1` read-only total; concurrent `1`; retry `0`; worker `0` |
32
+ | Minimum projected net saving | `30%` |
33
+ | Context transfer | fresh/isolated; tối đa `2.048` token; không inherit parent history |
32
34
  | Review lenses | `correctness`, `tests`, `scope` |
33
35
  | Field Guide | `.pi/memory/MEMORY.md`, advisory, explicit-write only |
34
- | Writer policy | Một writer cho một write set. |
36
+ | Writer policy | Parent model là writer duy nhất. |
35
37
 
36
38
  Model role guidance:
37
39
 
38
40
  - planner: model mạnh nhất hợp lý cho decomposition, architecture, risk, acceptance criteria;
39
- - worker: model nhanh/ổn định cho bounded implementation đã có plan;
40
- - reviewer: model/thinking decorrelated với worker khi review quan trọng;
41
- - watchdog/oracle: model mạnh chỉ cho final risk/security/release/high-impact.
41
+ - worker: disabled; parent model implement trực tiếp;
42
+ - reviewer/oracle: role read-only ngoại lệ; không tự chạy chỉ vì review quan trọng;
43
+ - builtin agents và watchdog: disabled trong baseline Piagent.
42
44
 
43
45
  ## Khi nào parent nên tự spawn
44
46
 
45
- Parent nên tự spawn subagents khi có ít nhất một điều kiện:
47
+ Chỉ spawn khi **đồng thời** thỏa tất cả điều kiện:
46
48
 
47
- - cần scout nhiều vùng source độc lập;
48
- - cần map BE contract read-only trong khi FE implementation là write target;
49
- - cần đọc external source docs/repo và repo hiện tại song song;
50
- - cần external research có nguồn dẫn, và `pi-web-access`/web tools đang available;
51
- - cần tạo context handoff trước task lớn (`context-builder`);
52
- - cần review nhiều góc độc lập: correctness, tests, security, scope drift;
53
- - task có từ 3 touchpoint trở lên;
54
- - task medium/high-risk nhưng có phần audit read-only trước khi edit;
55
- - context có nguy cơ phình to nếu parent tự đọc toàn bộ log/spec/source.
49
+ - runtime xác định ít nhất hai workstream thật sự độc lập;
50
+ - helper có thể hoàn tất mà không chờ output tiếp theo của parent;
51
+ - helper chỉ cần read/grep/find/ls;
52
+ - request dùng fresh isolated context, seed không quá 2.048 token;
53
+ - estimate gồm parent + helper + transfer + merge thấp hơn solo ít nhất 30%;
54
+ - task run chưa từng launch helper và không retry một lỗi runtime/scope xác định.
56
55
 
57
56
  ## Khi nào không nên tự spawn
58
57
 
59
58
  Không spawn nếu:
60
59
 
61
60
  - task nhỏ, một file, verify đơn giản;
61
+ - không có runtime estimate hoặc projected saving dưới 30%;
62
62
  - requirement chưa rõ và cần hỏi user trước;
63
63
  - chỉ có một write target nhỏ;
64
64
  - subagent tool/package chưa available;
65
65
  - repo dirty hoặc write set có nguy cơ overlap mà chưa phân tách được;
66
66
  - task high-risk cần human gate trước khi edit;
67
- - muốn spawn nhiều writer song song nhưng không có worktree isolation/approval.
67
+ - cần bất kỳ mutation nào từ child;
68
+ - muốn planner/reviewer chỉ để “tăng chất lượng” nhưng không giảm tổng token;
69
+ - đã có một helper attempt, kể cả attempt failed/orphaned.
68
70
 
69
71
  ## Default agent mapping
70
72
 
@@ -72,13 +74,10 @@ Không spawn nếu:
72
74
  |---|---|---|
73
75
  | Map unfamiliar repo/module/spec | `piagent-scout` | read-only |
74
76
  | Build implementation plan | `piagent-planner` | read-only |
75
- | Implement approved bounded change | `piagent-worker` | single writer |
76
77
  | Review current diff | `piagent-reviewer` | review-first |
77
78
  | Challenge architecture/risk | `piagent-oracle` | read-only |
78
- | External docs/web research | builtin `researcher` | read-only; requires web tools |
79
- | Large context handoff | builtin `context-builder` or `piagent-scout` | writes handoff artifact only |
80
79
 
81
- Default rule: parallel read-only is OK; parallel writers are not default.
80
+ Default rule: parent direct. Tối đa một role read-only ở bảng trên; không parallel và không worker.
82
81
 
83
82
  ## Workflow policy
84
83
 
@@ -89,42 +88,26 @@ Parent should:
89
88
  1. load piagent context/profile/memory/project context;
90
89
  2. load `piagent_orchestration_policy`;
91
90
  3. create a compact task tree/workPlan and review lenses in `piagent_task_start`;
92
- 4. decide whether subagents are useful enough to justify extra token cost;
93
- 5. if useful, spawn bounded read-only scout/planner/reviewer before or after implementation;
94
- 6. keep implementation single-writer unless user explicitly approves otherwise;
91
+ 4. runtime tính projected total tokens; thiếu estimate hoặc saving dưới 30% thì skip;
92
+ 5. nếu đủ điều kiện, spawn đúng một helper fresh/read-only;
93
+ 6. parent tự implement và review;
95
94
  7. summarize subagent outputs into task contract/context manifest/final response.
96
95
 
97
96
  ### `/workflow be-to-fe`
98
97
 
99
- Recommended auto-delegation:
100
-
101
- - `piagent-scout`: map backend contract read-only;
102
- - `piagent-scout`: map frontend touchpoints read-only;
103
- - `piagent-planner`: produce FE implementation plan;
104
- - parent or `piagent-worker`: implement FE only;
105
- - `piagent-reviewer`: review diff and verify coverage.
98
+ Parent map BE contract, map FE touchpoints, implement và review. Runtime chỉ được chọn **một** trong hai lane mapping cho `piagent-scout` nếu estimate toàn task đạt ngưỡng 30%; lane còn lại vẫn do parent làm.
106
99
 
107
100
  ### `/workflow platform-improve`
108
101
 
109
- Recommended auto-delegation:
110
-
111
- - `piagent-scout`: inspect current platform source/docs;
112
- - builtin `researcher`: inspect official docs/web evidence when `pi-web-access` is installed;
113
- - builtin `context-builder`: create handoff context/meta-prompt for large platform changes;
114
- - `piagent-scout`: inspect official docs/external source repo targeted evidence;
115
- - `piagent-planner`: produce implementation matrix;
116
- - parent or `piagent-worker`: implement bounded changes;
117
- - `piagent-reviewer`: review docs/runtime behavior.
102
+ Parent inspect, research, plan, implement và review. Một fresh read-only helper chỉ được map một lane độc lập khi runtime estimate tổng token đạt ngưỡng; không dùng chain scout → planner → worker → reviewer.
118
103
 
119
104
  ### `/review`
120
105
 
121
- Recommended auto-delegation:
106
+ Parent-owned review:
122
107
 
123
108
  - select explicit review lenses first;
124
- - optional parallel `piagent-reviewer` for correctness;
125
- - optional parallel `piagent-reviewer` for tests/verification;
126
- - optional parallel `piagent-reviewer` for scope/protected-path drift;
127
- - optional `piagent-oracle` for architecture/high-risk concerns.
109
+ - parent cover các lens trong cùng context;
110
+ - chỉ dùng một fresh read-only reviewer/oracle nếu nó thay thế một lane độc lập và estimate tiết kiệm ít nhất 30%.
128
111
 
129
112
  If the user explicitly asks for a review loop, use `/review-loop` or an equivalent parent-controlled loop with max rounds. Do not blindly apply all reviewer suggestions.
130
113
 
@@ -136,17 +119,7 @@ Single scout:
136
119
  Use piagent-scout to map the target module read-only. Return files, ownership, invariants, and likely change points only.
137
120
  ```
138
121
 
139
- Parallel scout:
140
-
141
- ```text
142
- Run parallel piagent-scout agents: one maps backend contract read-only, one maps frontend touchpoints read-only. Wait for both and summarize the contract-to-FE map.
143
- ```
144
-
145
- Parallel review:
146
-
147
- ```text
148
- Run parallel piagent-reviewer agents for correctness, tests/verification, and scope/protected-path drift. Wait for all and summarize findings by severity.
149
- ```
122
+ The parent must attach runtime evidence equivalent to: `independent lanes >= 2`, `context=fresh`, `inheritedParentTokens=0`, and `projectedNetSaving>=30%`. Without it, do not call the helper tool.
150
123
 
151
124
  Tool syntax fallback:
152
125
 
@@ -159,7 +132,7 @@ subagent({ agent: "piagent-scout", task: "Map target area read-only. Return conc
159
132
  Final response should include one line:
160
133
 
161
134
  ```text
162
- Subagents: <not used / unavailable / used: piagent-scout, piagent-reviewer>
135
+ Helper: <skip reason=<code> projectedSaving=<unknown|N%> / dispatch role=<role> projectedSaving=N%>
163
136
  ```
164
137
 
165
138
  If not used, give the reason briefly:
@@ -172,19 +145,11 @@ If not used, give the reason briefly:
172
145
 
173
146
  ## Token rule
174
147
 
175
- Subagents can reduce parent context pollution, but total token usage can increase because each child does its own model/tool work. Use them for parallelizable read-heavy work and review quality, not as a blanket token-saving switch.
148
+ Projected saving phải so sánh **tổng parent + child + handoff + merge**, không so child với một đoạn parent context riêng lẻ. Ngưỡng 30% là dispatch gate, không phải bằng chứng rằng Piagent đã rẻ hơn `codex-cli` 30–40%; kết luận đó chỉ được đưa ra từ paired benchmark Piagent/`codex-cli` cùng model, thinking, task và success gate.
176
149
 
177
- ## Package shortcuts worth using
150
+ ## Package shortcuts
178
151
 
179
- | Shortcut | Use when |
180
- |---|---|
181
- | `/parallel-review` | Need distinct review angles; add `autofix` only when user permits fixes. |
182
- | `/review-loop` | Need worker/reviewer/fix loop until clean or capped. |
183
- | `/parallel-research` | Need external evidence + local code context. |
184
- | `/parallel-context-build` | Need context/meta-prompt handoff before a large plan. |
185
- | `/parallel-handoff-plan` | Need research + context-builder + implementation handoff. |
186
- | `/gather-context-and-clarify` | Need scout/research first, then ask only meaningful questions. |
187
- | `/parallel-cleanup` | Need post-implementation cleanup review. |
152
+ Các shortcut `/parallel-*`, worker/reviewer loop và grant-spawn-budget thuộc package upstream nhưng không nằm trong Piagent governed default. Absolute Piagent budget vẫn là một read-only helper total; daily workflow không dùng các shortcut này.
188
153
 
189
154
  See `docs/subagent-orchestration-capabilities.md`.
190
155