@piagent/platform 1.7.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/AGENTS.md +7 -0
  2. package/CHANGELOG.md +113 -1
  3. package/README.md +45 -70
  4. package/README.vi.md +34 -61
  5. package/architecture/layers.json +16 -3
  6. package/catalog/capabilities.json +14 -7
  7. package/catalog/claude-model-additions.json +42 -0
  8. package/docs/auto-delegation-policy.md +2 -0
  9. package/docs/command-reference-vietnamese.md +69 -91
  10. package/docs/context-window-policy.md +5 -5
  11. package/docs/distribution-standard.md +16 -19
  12. package/docs/en/architecture.md +9 -1
  13. package/docs/herdr-workflow.md +2 -3
  14. package/docs/languages.json +4 -4
  15. package/docs/managed-local-acceptance.md +403 -0
  16. package/docs/mcp-and-tools.md +5 -7
  17. package/docs/memory-policy.md +3 -3
  18. package/docs/model-options.md +22 -17
  19. package/docs/oauth-providers.md +1 -1
  20. package/docs/operator-manual-vietnamese.md +85 -130
  21. package/docs/package-architecture-notes.md +4 -4
  22. package/docs/piagent-core-improvement-plan.md +3 -5
  23. package/docs/piagent-core-plan-checkpoint-2026-09-06.json +2 -13
  24. package/docs/piagent-runtime-benchmark-execution-plan.md +10 -8
  25. package/docs/project-adapters.md +3 -3
  26. package/docs/project-onboarding.md +15 -16
  27. package/docs/publishing-for-teams.md +3 -1
  28. package/docs/quality-benchmark.md +2 -0
  29. package/docs/quickstart-vietnamese.md +24 -25
  30. package/docs/release-install-policy.md +16 -11
  31. package/docs/research/harness-next-evidence-review.md +7 -7
  32. package/docs/runtime-harness-standard.md +2 -0
  33. package/docs/runtime-policy-design.md +2 -0
  34. package/docs/runtime-quality-baseline.md +2 -0
  35. package/docs/subagent-orchestration-capabilities.md +1 -1
  36. package/docs/subagents-and-multiagent.md +10 -8
  37. package/docs/task-implementation-contract.md +2 -0
  38. package/docs/task-lifecycle-vietnamese.md +2 -0
  39. package/docs/team-onboarding.md +33 -64
  40. package/docs/usage-observability.md +2 -2
  41. package/docs/vi/architecture.md +9 -1
  42. package/docs/workflow-recipes.md +6 -10
  43. package/docs-site/architecture.html +4 -3
  44. package/docs-site/assets/docs.css +80 -0
  45. package/docs-site/benchmark.html +7 -1
  46. package/docs-site/commands.html +37 -23
  47. package/docs-site/content/architecture.html +2 -2
  48. package/docs-site/content/benchmark.html +5 -0
  49. package/docs-site/content/commands.html +35 -22
  50. package/docs-site/content/ecosystem.html +144 -0
  51. package/docs-site/content/en/architecture.html +1 -1
  52. package/docs-site/content/en/benchmark.html +5 -0
  53. package/docs-site/content/en/commands.html +30 -13
  54. package/docs-site/content/en/ecosystem.html +144 -0
  55. package/docs-site/content/en/index.html +24 -9
  56. package/docs-site/content/en/quickstart.html +10 -12
  57. package/docs-site/content/en/runtime.html +1 -1
  58. package/docs-site/content/en/security.html +1 -1
  59. package/docs-site/content/en/team.html +2 -2
  60. package/docs-site/content/en/whats-new.html +89 -1
  61. package/docs-site/content/en/workflows.html +29 -31
  62. package/docs-site/content/index.html +24 -9
  63. package/docs-site/content/quickstart.html +10 -12
  64. package/docs-site/content/runtime.html +2 -2
  65. package/docs-site/content/security.html +2 -2
  66. package/docs-site/content/team.html +2 -2
  67. package/docs-site/content/whats-new.html +89 -1
  68. package/docs-site/content/workflows.html +36 -38
  69. package/docs-site/context-engine.html +2 -1
  70. package/docs-site/ecosystem.html +283 -0
  71. package/docs-site/en/architecture.html +3 -2
  72. package/docs-site/en/benchmark.html +7 -1
  73. package/docs-site/en/commands.html +32 -14
  74. package/docs-site/en/context-engine.html +2 -1
  75. package/docs-site/en/ecosystem.html +283 -0
  76. package/docs-site/en/index.html +30 -14
  77. package/docs-site/en/mcp-approval.html +2 -1
  78. package/docs-site/en/mcp-auth.html +2 -1
  79. package/docs-site/en/mcp-servers.html +2 -1
  80. package/docs-site/en/mcp.html +2 -1
  81. package/docs-site/en/permissions.html +2 -1
  82. package/docs-site/en/profiles.html +2 -1
  83. package/docs-site/en/quickstart.html +17 -18
  84. package/docs-site/en/runtime.html +3 -2
  85. package/docs-site/en/scope.html +2 -1
  86. package/docs-site/en/security.html +6 -5
  87. package/docs-site/en/team.html +4 -3
  88. package/docs-site/en/whats-new.html +97 -8
  89. package/docs-site/en/workflows.html +34 -35
  90. package/docs-site/index.html +30 -14
  91. package/docs-site/mcp-approval.html +2 -1
  92. package/docs-site/mcp-auth.html +2 -1
  93. package/docs-site/mcp-servers.html +2 -1
  94. package/docs-site/mcp.html +2 -1
  95. package/docs-site/permissions.html +2 -1
  96. package/docs-site/profiles.html +2 -1
  97. package/docs-site/quickstart.html +17 -18
  98. package/docs-site/runtime.html +4 -3
  99. package/docs-site/scope.html +2 -1
  100. package/docs-site/security.html +7 -6
  101. package/docs-site/team.html +4 -3
  102. package/docs-site/whats-new.html +97 -8
  103. package/docs-site/workflows.html +41 -42
  104. package/evals/fs5-causal-arm.v1.json +2 -2
  105. package/evals/private-holdout-v1/CURRENT_BOUNDARY.md +17 -0
  106. package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
  107. package/package.json +10 -9
  108. package/packages/piagent-core/README.md +15 -23
  109. package/packages/piagent-core/docs/context-efficiency-improvement-plan.md +2 -0
  110. package/packages/piagent-core/extensions/experiment-loop-policy.ts +75 -0
  111. package/packages/piagent-core/extensions/local-state-path.js +15 -0
  112. package/packages/piagent-core/extensions/piagent-guard.ts +108 -960
  113. package/packages/piagent-core/extensions/policy-core.js +2 -2
  114. package/packages/piagent-core/extensions/source-checkout-paths.ts +54 -0
  115. package/packages/piagent-core/managed/broker-client.mjs +49 -0
  116. package/packages/piagent-core/managed/capabilities.mjs +28 -0
  117. package/packages/piagent-core/managed/compaction.mjs +63 -0
  118. package/packages/piagent-core/managed/doctor.mjs +107 -0
  119. package/packages/piagent-core/managed/native-catalog.mjs +42 -0
  120. package/packages/piagent-core/managed/patch-snapshot.mjs +48 -0
  121. package/packages/piagent-core/managed/repository-operation.mjs +84 -0
  122. package/packages/piagent-core/managed/request-stream.mjs +129 -0
  123. package/packages/piagent-core/managed/resource-loader.mjs +42 -0
  124. package/packages/piagent-core/managed/review-snapshot-worker.mjs +27 -0
  125. package/packages/piagent-core/managed/sandbox-diagnostic.mjs +12 -0
  126. package/packages/piagent-core/managed/search-fallback.mjs +93 -0
  127. package/packages/piagent-core/managed/session.mjs +472 -0
  128. package/packages/piagent-core/managed/store.d.mts +3 -0
  129. package/packages/piagent-core/managed/store.mjs +64 -0
  130. package/packages/piagent-core/managed/tool-boundary.mjs +243 -0
  131. package/packages/piagent-core/managed/tool-worker.mjs +36 -0
  132. package/packages/piagent-core/managed/toolchain.mjs +120 -0
  133. package/packages/piagent-core/managed/web-fetch.mjs +105 -0
  134. package/packages/piagent-core/managed/web-search.mjs +96 -0
  135. package/packages/piagent-core/managed/workflow.mjs +299 -0
  136. package/packages/piagent-core/package.json +3 -6
  137. package/packages/piagent-core/policies/base-policy.json +80 -26
  138. package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +3 -3
  139. package/packages/piagent-core/runtime/hooks/input-hook.ts +35 -196
  140. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +2 -0
  141. package/packages/piagent-core/runtime/inspection/approval-broker.ts +9 -1
  142. package/packages/piagent-core/runtime/inspection/same-process-bridge-proof.ts +1 -1
  143. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +1 -1
  144. package/packages/piagent-core/runtime/managed-failure.d.mts +10 -0
  145. package/packages/piagent-core/runtime/managed-failure.mjs +164 -0
  146. package/packages/piagent-core/runtime/model/model-route-policy.ts +33 -13
  147. package/packages/piagent-core/runtime/model/model-route-types.ts +10 -6
  148. package/packages/piagent-core/runtime/orchestration/minimal-delegation-policy.ts +8 -29
  149. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +1 -1
  150. package/packages/piagent-core/runtime/policy/block-remedy.ts +5 -3
  151. package/packages/piagent-core/runtime/registration/context-commands.ts +1 -1
  152. package/packages/piagent-core/runtime/registration/knowledge-tools.ts +7 -7
  153. package/packages/piagent-core/runtime/registration/policy-tools.ts +2 -2
  154. package/packages/piagent-core/runtime/registration/session-commands.ts +11 -26
  155. package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +1 -1
  156. package/packages/piagent-core/runtime/session/system-prompt.ts +6 -7
  157. package/packages/piagent-core/runtime/workflows/webui-runtime-command.ts +6 -6
  158. package/packages/piagent-core/runtime/workflows/webui-workflow.ts +6 -11
  159. package/packages/piagent-core/security/sensitive-text.js +9 -0
  160. package/packages/piagent-core/skills/piagent-ops/SKILL.md +8 -10
  161. package/packages/piagent-core/skills/test-audit/SKILL.md +101 -0
  162. package/packages/piagent-core/subagents/piagent-planner.md +1 -1
  163. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-DGk34zJT.js → MarkdownMessage-Dd9wPk-v.js} +1 -1
  164. package/packages/piagent-webui/dist/client/assets/index-7I-50Q2U.js +228 -0
  165. package/packages/piagent-webui/dist/client/assets/{index-DVahUVWy.css → index-DgSmcnP8.css} +1 -1
  166. package/packages/piagent-webui/dist/client/index.html +2 -2
  167. package/packages/piagent-webui/extension/piagent-webui.ts +11 -11
  168. package/packages/piagent-webui/extension/session-stream-adapter.ts +3 -1
  169. package/packages/piagent-webui/extension/terminal-session-adapter.ts +6 -1
  170. package/packages/piagent-webui/gateway/company-relay.ts +308 -0
  171. package/packages/piagent-webui/gateway/control-socket.ts +39 -12
  172. package/packages/piagent-webui/gateway/gateway-service.ts +109 -28
  173. package/packages/piagent-webui/gateway/gateway-session-stream.ts +58 -2
  174. package/packages/piagent-webui/gateway/managed-gateway.mjs +41 -0
  175. package/packages/piagent-webui/gateway/managed-launch.ts +145 -0
  176. package/packages/piagent-webui/gateway/managed-projection.ts +20 -0
  177. package/packages/piagent-webui/gateway/pi-host.ts +22 -4
  178. package/packages/piagent-webui/gateway/runtime-session-controls.ts +5 -2
  179. package/packages/piagent-webui/gateway/session-approval-authority.ts +28 -0
  180. package/packages/piagent-webui/gateway/session-catalog.ts +11 -3
  181. package/packages/piagent-webui/gateway/session-command-controller.ts +8 -2
  182. package/packages/piagent-webui/gateway/session-file-facts.ts +25 -0
  183. package/packages/piagent-webui/gateway/session-inspection-registry.ts +42 -12
  184. package/packages/piagent-webui/gateway/session-list-cache.ts +68 -0
  185. package/packages/piagent-webui/gateway/session-runtime-ownership.ts +8 -1
  186. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +20 -27
  187. package/packages/piagent-webui/ownership/managed-terminal-lease.ts +27 -0
  188. package/packages/piagent-webui/ownership/profile-state.ts +2 -0
  189. package/packages/piagent-webui/ownership/session-lease-store.ts +22 -1
  190. package/packages/piagent-webui/server/approval-projection.ts +9 -0
  191. package/packages/piagent-webui/server/core-inspection-provider.ts +4 -9
  192. package/packages/piagent-webui/server/loopback-server.ts +37 -1
  193. package/packages/piagent-webui/server/message-stop-reason.ts +11 -0
  194. package/packages/piagent-webui/server/tool-call-summary.ts +185 -0
  195. package/packages/piagent-webui/server/transcript-projection.ts +86 -3
  196. package/packs/engineering-base/pack.json +4 -0
  197. package/schemas/piagent-webui/runtime-command-v1.schema.json +1 -2
  198. package/schemas/piagent-webui/session-catalog-v1.schema.json +8 -0
  199. package/schemas/piagent-webui/transcript-v1.schema.json +94 -1
  200. package/scripts/build-docs-site.mjs +23 -12
  201. package/scripts/check-public-wording.mjs +5 -6
  202. package/scripts/check-runtime-advisories.mjs +23 -6
  203. package/scripts/claude-model-additions.mjs +33 -0
  204. package/scripts/configure-model-scope.sh +36 -8
  205. package/scripts/configure-subagents.sh +1 -1
  206. package/scripts/explain-command.mjs +5 -6
  207. package/scripts/install-global.sh +2 -2
  208. package/scripts/model-route-evaluation-core.ts +1 -0
  209. package/scripts/model-scope-prune.mjs +75 -0
  210. package/scripts/phase-tools-evaluation.mjs +9 -4
  211. package/scripts/pi-model-route.mjs +1 -1
  212. package/scripts/piagent-cli.mjs +51 -2
  213. package/scripts/piagent-dashboard.mjs +27 -4
  214. package/scripts/piagent-installations.mjs +26 -0
  215. package/scripts/piagent-studio.mjs +155 -0
  216. package/scripts/runtime-advisory-exceptions.json +29 -0
  217. package/scripts/setup.sh +2 -2
  218. package/scripts/team-doctor.sh +20 -1
  219. package/scripts/typescript-loader.mjs +6 -0
  220. package/scripts/verify-local.sh +5 -5
  221. package/scripts/verify-release-identity.mjs +1 -1
  222. package/templates/global/settings.json +8 -2
  223. package/templates/project/.pi/project-context.md +3 -3
  224. package/templates/project/AGENTS.md +4 -5
  225. package/docs/piagent-core-reasoning-research-2026-09-06.md +0 -225
  226. package/docs/piagent-core-research-sources-2026-09-06.json +0 -416
  227. package/packages/piagent-webui/dist/client/assets/index-DiKRmCEP.js +0 -176
@@ -7,6 +7,12 @@
7
7
  "packages/piagent-core/extensions/piagent-guard.ts"
8
8
  ]
9
9
  },
10
+ {
11
+ "name": "managed",
12
+ "roots": [
13
+ "packages/piagent-core/managed"
14
+ ]
15
+ },
10
16
  {
11
17
  "name": "runtime",
12
18
  "roots": [
@@ -167,7 +173,8 @@
167
173
  "webui-shared",
168
174
  "runtime",
169
175
  "core",
170
- "security"
176
+ "security",
177
+ "managed"
171
178
  ],
172
179
  "webui-ownership": [
173
180
  "webui-ownership"
@@ -195,7 +202,12 @@
195
202
  "webui-gateway",
196
203
  "webui-ownership",
197
204
  "webui-server",
198
- "webui-shared"
205
+ "webui-shared",
206
+ "managed"
207
+ ],
208
+ "managed": [
209
+ "managed",
210
+ "runtime"
199
211
  ]
200
212
  },
201
213
  "lineBudgets": {
@@ -215,7 +227,8 @@
215
227
  "webui-ownership": 500,
216
228
  "webui-shared": 200,
217
229
  "webui-build": 500,
218
- "entrypoints": 800
230
+ "entrypoints": 800,
231
+ "managed": 500
219
232
  },
220
233
  "files": {
221
234
  "packages/piagent-core/extensions/piagent-guard.ts": 5000,
@@ -26,8 +26,8 @@
26
26
  "path": "evals/scenarios/capability-resolution.json"
27
27
  },
28
28
  {
29
- "byteSize": 7199,
30
- "digest": "sha256:661350c9d639c9f6094e5606a32587f50550ab498edabe779ec30202bd3d353f",
29
+ "byteSize": 7631,
30
+ "digest": "sha256:e50361eda8ca41dc75afdff2ff21498499147b494ad4ed7b444a4a29279ba884",
31
31
  "id": "base-policy",
32
32
  "kind": "policies",
33
33
  "path": "packages/piagent-core/policies/base-policy.json"
@@ -75,15 +75,22 @@
75
75
  "path": "packs/engineering-base/recipes/bounded-change.json"
76
76
  },
77
77
  {
78
- "byteSize": 1832,
79
- "digest": "sha256:a1c21e7d1c3ab12fff8516bbac2922526e35b37a6852eaa9f5a7d98a102b830e",
78
+ "byteSize": 1423,
79
+ "digest": "sha256:b6b61c4fdd895d86e908be65d0be5e08eb615c105e2e4cec71aae3c680ea2c14",
80
80
  "id": "piagent-ops",
81
81
  "kind": "skills",
82
82
  "path": "packages/piagent-core/skills/piagent-ops/SKILL.md"
83
83
  },
84
84
  {
85
- "byteSize": 2223,
86
- "digest": "sha256:18f865d816c5a5cee50bf3b2b407c23a2e67e1e92d929001a0f24c04d0c20e03",
85
+ "byteSize": 5044,
86
+ "digest": "sha256:d3f8071a94338d02647e28914050d25e12d06a883d5a4bf1ec1dced6576dec08",
87
+ "id": "test-audit",
88
+ "kind": "skills",
89
+ "path": "packages/piagent-core/skills/test-audit/SKILL.md"
90
+ },
91
+ {
92
+ "byteSize": 2146,
93
+ "digest": "sha256:81625648bbd1fc798a276b0d49131a68dec0f097fa6b73557a339376cd5502ca",
87
94
  "id": "piagent-planner",
88
95
  "kind": "subagents",
89
96
  "path": "packages/piagent-core/subagents/piagent-planner.md"
@@ -112,7 +119,7 @@
112
119
  ],
113
120
  "dependencies": [],
114
121
  "description": "Core engineering workflow, policy, verification, and task coordination capabilities.",
115
- "digest": "sha256:b9671f0c2da79012b8638c98459d5bbe9e444fd39fdabe17f54477ec18cc9fdf",
122
+ "digest": "sha256:2ed297c1fc283b477c44d4fe4787d670a2dade2283b27e579702d7d7be891d5d",
116
123
  "license": "MIT",
117
124
  "lifecycle": "experimental",
118
125
  "name": "engineering-base",
@@ -0,0 +1,42 @@
1
+ {
2
+ "piVersion": "0.87.1",
3
+ "reviewedOn": "2026-09-29",
4
+ "source": "https://platform.claude.com/docs/en/models/sonnet-5-5/overview",
5
+ "models": [
6
+ {
7
+ "id": "claude-sonnet-5-5",
8
+ "name": "Claude Sonnet 5.5",
9
+ "reasoning": true,
10
+ "input": [
11
+ "text",
12
+ "image"
13
+ ],
14
+ "cost": {
15
+ "input": 2,
16
+ "output": 10,
17
+ "cacheRead": 0.2,
18
+ "cacheWrite": 2.5
19
+ },
20
+ "contextWindow": 1000000,
21
+ "maxTokens": 128000,
22
+ "thinkingLevelMap": {
23
+ "off": null,
24
+ "minimal": null,
25
+ "low": "low",
26
+ "medium": "medium",
27
+ "high": "high",
28
+ "xhigh": "xhigh",
29
+ "max": "max"
30
+ },
31
+ "compat": {
32
+ "forceAdaptiveThinking": true,
33
+ "supportsTemperature": false,
34
+ "supportsStrictTools": true
35
+ },
36
+ "promptCache": {
37
+ "short": 300,
38
+ "long": 3600
39
+ }
40
+ }
41
+ ]
42
+ }
@@ -1,6 +1,8 @@
1
1
  # Solo-first orchestration policy
2
2
  <!-- language: vi; english-index: docs-site/content/en/workflows.html -->
3
3
 
4
+ > **Hồ sơ thiết kế trước bản 1.9.0.** Task contract, command workflow (`/workflow`, `/task`, `/fresh`, `/onboard`) và các tool task/trace/verify mô tả ở đây đã bỏ ngày 2026-09-30; session giờ là freeform và guard chỉ còn kiểm tra path, quyền, xác nhận, context budget và edit trên bản đọc cũ. Tài liệu được giữ để tra cứu lịch sử. Hành vi hiện tại: [README](../README.vi.md).
5
+
4
6
  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
7
 
6
8
  Kiểm tra policy hiện tại trong Pi:
@@ -7,13 +7,17 @@ File này là bảng tra cứu command chính cho Pi Agent Platform. Mục tiêu
7
7
 
8
8
  ## Cách đọc command
9
9
 
10
- Có 5 loại cần phân biệt:
10
+ Từ bản 1.9.0, công việc được yêu cầu bằng **lời thường**: không còn `/workflow`,
11
+ `/task`, `/scout`, `/fresh`, `/onboard`, `/commands` hay `/model-options`, và
12
+ session không tạo task contract. Slash command còn lại chỉ để xem trạng thái hoặc
13
+ đổi thiết lập; không command nào mở lượt model.
14
+
15
+ Có 4 loại cần phân biệt:
11
16
 
12
17
  | Loại | Gõ ở đâu | Ví dụ | Ý nghĩa |
13
18
  |---|---|---|---|
14
- | Runtime slash command | Bên trong Pi TUI | `/usage` | Extension chạy ngay, hiện kết quả/menu, **không gọi model follow-up**. |
15
- | Workflow launcher | Bên trong Pi TUI | `/workflow task <request>` | Runtime command mở menu hoặc gửi workflow prompt rõ ràng cho agent. |
16
- | Workflow alias | Bên trong Pi TUI | `/task <request>` | Alias cũ cho power user; vẫn cần agent turn. Team mới nên dùng `/workflow`. |
19
+ | Yêu cầu thường | Bên trong Pi TUI hoặc WebUI | `Scout luồng thanh toán FE/BE, chỉ đọc, không sửa` | Agent làm việc trực tiếp; guard vẫn áp quyền và xác nhận. |
20
+ | Runtime slash command | Bên trong Pi TUI | `/usage` | Extension chạy ngay, hiện kết quả/menu, **không gọi model**. |
17
21
  | Terminal command | Terminal đã có Bash | `piagent-mcp --preset core` | Cài, kiểm tra, hoặc cấu hình máy/project từ bên ngoài Pi. |
18
22
  | Pi native/hotkey | Bên trong Pi TUI | `/model`, `Ctrl+L` | Điều khiển native Pi như model/session/MCP. |
19
23
 
@@ -28,26 +32,24 @@ PiAgent không chiếm các command native đang dùng của Pi. Những command
28
32
  | `/login` | Đăng nhập provider/OAuth. |
29
33
  | `/model`, `Ctrl+L` | Chọn model/provider. |
30
34
  | `/name` | Đặt tên session; Piagent nhận rename event để map Agent Watch/report. |
35
+ | `/new` | Mở session mới, ví dụ khi session hiện tại đã nặng. |
31
36
  | `/session` | Xem session id/name/token/cost/context hiện tại. |
32
37
  | `/resume` | Resume session cũ bằng UI/native flow. |
33
38
  | `/compact` | Nén context bằng Pi native compaction. |
34
39
  | `/mcp`, `/mcp-auth` | Kiểm tra/kết nối MCP live và OAuth. |
35
40
 
36
- Command ngắn của PiAgent dùng cho workflow và guard local:
41
+ Command ngắn của PiAgent cho thiết lập và guard local:
37
42
 
38
43
  | PiAgent runtime | Vai trò |
39
44
  |---|---|
40
- | `/commands` | Menu/help command, không gọi model. |
41
- | `/workflow` | Launcher task/scout/plan/review/git/onboard. |
42
45
  | `/usage` | Usage live/history/preflight/compact/logs/efficiency. |
43
46
  | `/context` | Smart index/rebuild/search/pack/impact/efficiency/preflight/compact. |
44
47
  | `/permission` | Permission mode của session. |
45
48
  | `/fast` | Xem/bật/tắt OpenAI Codex Fast service tier cho session; không đổi model/thinking và không gọi model khi chạy command. |
46
49
  | `/profile` | Profile và tech stack. |
47
50
  | `/memory` | Project memory policy. |
48
- | `/onboard` | Project onboarding/status/setup. |
49
- | `/fresh` | Tạo session mới cho workflow. |
50
- | `/piagent-inspector` | Menu quan sát file diff, command, safety và context của task/session. |
51
+ | `/piagent-status` | Profile, guard, runtime và trạng thái model đã xác thực. |
52
+ | `/piagent-inspector` | Menu quan sát file diff, command, safety và context của session. |
51
53
 
52
54
  Riêng MCP governance vẫn giữ `/piagent-mcp` vì `/mcp` đã là command native của Pi.
53
55
 
@@ -65,100 +67,78 @@ Trong Pi:
65
67
  ```text
66
68
  /login
67
69
  /model
68
- /commands
69
- /onboard
70
+ /profile
70
71
  /context index
71
72
  /context rebuild
72
73
  /memory
73
74
  ```
74
75
 
75
- Các lần sau:
76
-
77
- ```bash
78
- cd /path/to/project
79
- pi
80
- ```
81
-
82
- Trong Pi:
76
+ Rồi nhờ agent onboard project bằng lời thường:
83
77
 
84
78
  ```text
85
- /workflow task Implement <task cụ thể>.
79
+ Đọc project này (chỉ đọc) và ghi lại project context.
86
80
  ```
87
81
 
88
- Nếu chỉ scout/audit read-only:
82
+ Agent đọc project và ghi `.pi/project-context.md` bằng tool onboarding của Piagent.
83
+
84
+ Các lần sau chỉ cần nói việc cần làm:
89
85
 
90
86
  ```text
91
- /workflow scout Scout payment FE mapping vs BE. Do not edit source.
87
+ Implement <task cụ thể>. Chạy test của project sau khi sửa.
92
88
  ```
93
89
 
94
- Nếu session đang nặng hoặc Pi báo context overflow, dùng fresh workflow. Ba lệnh dưới đây là ví dụ phổ biến; `/fresh help` liệt kê toàn bộ workflow canonical:
90
+ Nếu chỉ scout/audit:
95
91
 
96
92
  ```text
97
- /fresh scout <read-only request>
98
- /fresh task <implementation request>
99
- /fresh be-to-fe <BE-readonly/FE request>
93
+ Scout mapping payment FE với BE. Chỉ đọc, không sửa source.
100
94
  ```
101
95
 
102
- Nếu task còn mơ hồ:
96
+ Nếu task còn mơ hồ, nói rõ là muốn bàn hoặc lập kế hoạch trước:
103
97
 
104
98
  ```text
105
- /workflow discuss <ý tưởng hoặc yêu cầu thô>
106
- /workflow plan <goal cần bóc tách>
99
+ Chưa sửa gì cả. Hỏi lại những điểm chưa rõ rồi đề xuất kế hoạch cho <goal>.
107
100
  ```
108
101
 
102
+ Nếu session đang nặng hoặc Pi báo context overflow, mở session mới bằng `/new`
103
+ (hoặc `/compact`) rồi nói lại yêu cầu.
104
+
109
105
  ## Nguyên tắc command/UX
110
106
 
111
107
  Pi Agent dùng ít namespace nhưng mỗi namespace có subcommand/menu rõ:
112
108
 
113
- - `/workflow` là cửa chính cho task/scout/review/git/onboard workflow. Workflow cần agent turn là cố ý và được nói rõ.
109
+ - Công việc (implement, scout, review, commit, PR) là yêu cầu thường; agent dùng tool bình thường và guard kiểm tra từng tool call.
114
110
  - `/usage` gom live usage, history/report hint, preflight, compact, logs, efficiency.
115
111
  - Pi native `/name` đặt tên session theo task; Piagent nhận rename event để Agent Watch/report map đúng việc.
116
- - `/fresh` mở session mới cho mọi workflow canonical khi phiên hiện tại đã nặng; chạy `/fresh help` để xem catalog hiện hành.
117
112
  - `/context` gom architecture map, code index, search, context pack, test impact, efficiency, preflight và semantic compact.
118
113
  - `/permission` gom permission status/read-only/workspace-write/full-access.
119
114
  - `/profile` là namespace duy nhất cho profile và tech stack.
120
- - `/commands` là runtime help/menu, không còn bắt agent đọc docs để giải thích.
121
115
  - `/piagent-inspector` là một namespace quan sát duy nhất; mở menu để tránh sinh thêm command rời.
122
116
  - Khi user cần chọn, ưu tiên select option. Khi UI select không khả dụng, trả exact command.
123
117
  - Hành động rủi ro như stage rộng, push, PR write, deploy, publish, thay đổi database hoặc external-provider write vẫn cần xác nhận người vận hành.
124
118
 
125
119
  ## Command chính cho team
126
120
 
127
- Các command này đến từ package `piagent-core`.
121
+ Các command này đến từ package `piagent-core`; tất cả chạy ngay và không gọi model.
128
122
 
129
123
  | Command | Dùng khi nào | Kết quả mong đợi |
130
124
  |---|---|---|
131
- | `/commands` | Không nhớ command. | Mở menu/help theo topic, không gọi model. |
132
- | `/workflow` | Muốn chọn task/scout/review/git/onboard bằng menu. | Mở workflow picker. |
133
- | `/workflow task <request>` | Requirement đã rõ và cần implement. | Launch task workflow cho agent. |
134
- | `/workflow scout <request>` | Cần scout/audit read-only. | Launch scout workflow cho agent. |
135
- | `/workflow be-to-fe <request>` | BE read-only, FE implementation. | Launch BE→FE workflow. |
136
- | `/workflow discuss <idea>` | Task còn mơ hồ. | Launch clarify workflow, không sửa code. |
137
- | `/workflow plan <goal>` | Cần plan trước khi sửa. | Launch plan workflow. |
138
- | `/workflow review <target>` | Review diff/source. | Launch review workflow. |
139
- | `/workflow commit [message]` | Diff đã review và muốn commit local. | Launch guarded commit workflow. |
140
- | `/workflow pr [title]` | Branch đã commit và muốn chuẩn bị PR. | Launch guarded PR workflow. |
141
- | `/workflow onboard [focus]` | First-read onboarding cần agent đọc project. | Launch onboarding workflow để ghi `.pi/project-context.md` và context index. |
142
- | `/onboard` | First-run setup/status. | Mở menu onboarding: status, run, profile, setup. |
143
125
  | `/profile` | Xem/áp profile và chọn tech. | Chạy ngay, không gọi model. |
144
126
  | `/profile setup` | Chọn profile + tech bằng option. | Ghi profile/lock/tech manifest. |
145
127
  | `/usage` | Xem live usage hoặc report hint. | Menu live/history/preflight/compact/logs/efficiency. |
146
- | `/task-preflight` | Xem product preflight deterministic. | Intent/risk/scope/runtime/solver/phases/tools/helpers/backend/approval có schema/version. |
147
- | `/piagent-status` | Xem product live status deterministic. | Task/phase/checkpoint/resume/recovery/helper/terminal receipt từ persisted evidence. |
128
+ | `/task-preflight` | Xem preflight deterministic cho một yêu cầu. | Context và shadow route có schema/version; không gọi model. |
129
+ | `/piagent-status` | Xem trạng thái Piagent. | Profile, guard, runtime và model đã xác thực. |
148
130
  | `/piagent-inspector` | Muốn xem Piagent đang làm gì, sửa file nào, diff bao nhiêu dòng, command nào fail/block và context còn bao nhiêu. | Mở menu `summary/files/commands/security/context/toggle`; read-only, không gọi model. |
149
- | `/fresh <workflow> <request>` | Phiên hiện tại đã nặng hoặc muốn tách việc; nhận mọi workflow canonical. | Mở session mới có tên và replay workflow prompt gọn; `/fresh help` liệt kê lựa chọn. |
131
+ | `/piagent-orchestration` | Xem chính sách helper/subagent. | Mode, giới hạn helper, review lens, Field Guide; không gọi model. |
150
132
  | `/context` | Xem index/search/pack/impact/efficiency/preflight/compact. | Menu context, không gọi model. |
151
133
  | `/permission` | Xem/đổi quyền runtime. | Menu status/read-only/workspace-write/full-access. |
152
134
  | `/fast status\|on\|off` | Xem/bật/tắt Fast service tier cho session OpenAI Codex. | Chạy ngay, 0 model token; giữ nguyên model/thinking. Session trống mặc định tắt, environment override hoặc state đã lưu khi resume có thể được ưu tiên. |
153
135
  | `/memory` hoặc `/memory-policy` | Xem memory policy. | Chạy ngay, không gọi model. |
154
- | `/model-options` | Xem hướng dẫn model/thinking. | Chạy ngay; chọn model vẫn dùng `/model` hoặc `Ctrl+L`. |
155
136
  | `/piagent-mcp` | Xem/quản trị MCP trong Pi. | Menu MCP, không gọi model. |
156
137
 
157
- `/piagent-inspector` không thêm bước bắt buộc vào workflow. Panel bốn dòng tự
158
- hiện sát phía trên footer native từ lúc mở session. Khi có Task Contract, panel
159
- dùng các file task đã quan sát; không có task thì dùng working-tree status. View `files` mới tính exact snapshot
160
- delta so với task baseline. Gõ command không kèm option để mở menu, hoặc dùng
161
- trực tiếp:
138
+ `/piagent-inspector` không thêm bước bắt buộc nào. Panel bốn dòng tự hiện sát
139
+ phía trên footer native từ lúc mở session và dùng working-tree status (bản ghi
140
+ task cũ, nếu có, chỉ còn để xem lịch sử). Gõ command không kèm option để mở menu,
141
+ hoặc dùng trực tiếp:
162
142
 
163
143
  Panel dùng màu theo mức độ: file cyan, test magenta, dòng thêm xanh lá, dòng
164
144
  xóa đỏ; command pass xanh lá, blocked vàng, failed và safety warning đỏ. Context
@@ -175,44 +155,42 @@ nếu terminal cần output không màu.
175
155
  /piagent-inspector --json summary
176
156
  ```
177
157
 
178
- `files` tách source/test và hiển thị `+/-`. Nếu task sửa một file đã dirty trước
179
- khi task bắt đầu, scope được ghi `mixed-working-tree` thay vì nhận nhầm toàn bộ
180
- line diff là do task hiện tại. `commands` tách requested/executed/passed/failed/
181
- blocked. `security` chỉ hiện policy block, secret redaction và integrity warning
182
- đã quan sát. `context` dùng exact usage theo turn/session mà Pi cung cấp; token
183
- theo từng built-in tool call luôn ghi unavailable, không ước lượng.
158
+ `files` tách source/test và hiển thị `+/-`. `commands` tách requested/executed/
159
+ passed/failed/blocked. `security` chỉ hiện policy block, secret redaction và
160
+ integrity warning đã quan sát. `context` dùng exact usage theo turn/session mà Pi
161
+ cung cấp; token theo từng built-in tool call luôn ghi unavailable, không ước lượng.
184
162
 
185
- Alias cũ vẫn giữ để không phá thói quen:
163
+ Alias còn giữ:
186
164
 
187
165
  | Alias | Command chính |
188
166
  |---|---|
189
- | `/task <request>` | `/workflow task <request>` |
190
- | `/scout <request>` | `/workflow scout <request>` |
191
- | `/be-to-fe <request>` | `/workflow be-to-fe <request>` |
192
- | `/commit [message]` | `/workflow commit [message]` |
193
- | `/pr [title]` | `/workflow pr [title]` |
194
167
  | `/setname <name>` | Pi native `/name <name>` |
195
- | `/fresh-task <request>` | `/fresh task <request>` |
196
- | `/fresh-scout <request>` | `/fresh scout <request>` |
197
- | `/fresh-be-to-fe <request>` | `/fresh be-to-fe <request>` |
198
168
  | `/context-index` | `/context index` |
199
- | `/task-preflight` | `/context preflight` |
200
169
  | `/permission-status`, `/read-only`, `/workspace-write`, `/full-access` | `/permission ...` |
201
170
 
202
- Git flow của Pi cố ý không dùng namespace `/git-*`. Daily flow là nói tự nhiên hoặc đi qua `/workflow`:
171
+ Các command và alias đã bỏ từ bản 1.9.0: `/workflow`, `/task`, `/scout`,
172
+ `/be-to-fe`, `/discuss`, `/plan`, `/review`, `/commit`, `/pr`, `/fresh`,
173
+ `/fresh-task`, `/fresh-scout`, `/fresh-be-to-fe`, `/onboard`,
174
+ `/onboard-project`, `/commands`, `/piagent-commands`, `/model-options`,
175
+ `/profiles`, `/profile-tech`. Gõ chúng bây giờ sẽ được gửi như tin nhắn thường.
176
+
177
+ Git flow của Pi cố ý không dùng namespace `/git-*`. Cứ nói tự nhiên:
203
178
 
204
179
  ```text
205
- /workflow commit docs: update onboarding notes
206
- /workflow pr Add guarded git workflow
180
+ Commit hai file docs vừa sửa với message "docs: update onboarding notes".
181
+ Tạo draft PR cho branch này, title "Add guarded git notes".
207
182
  ```
208
183
 
209
- Alias `/commit` và `/pr` vẫn chạy. Commit workflow chỉ tạo local commit. PR workflow có thể cần `git push` và GitHub write action, nên guard vẫn bắt agent xác nhận rõ branch/title/scope trước khi đẩy hoặc tạo PR. Các lệnh stage rộng như `git add .`, `git add -A`, `git add --all`, `git add -- .`, `git add :/` cũng bị đưa qua confirmation để tránh gom nhầm file riêng tư hoặc unrelated diff.
184
+ Commit chỉ tạo local commit. `git push` và thao tác ghi lên GitHub (tạo PR,
185
+ comment…) luôn hỏi xác nhận trước. Các lệnh stage rộng như `git add .`,
186
+ `git add -A`, `git add --all`, `git add -- .`, `git add :/` cũng bị đưa qua
187
+ confirmation để tránh gom nhầm file riêng tư hoặc unrelated diff.
210
188
 
211
189
  ## Image/screenshot input
212
190
 
213
191
  | Tình huống | Cách dùng | Kết quả |
214
192
  |---|---|---|
215
- | Chat box trả ra local path ảnh | `/workflow scout Check screenshot ~/Documents/team-screenshots/screenshot.png` | Platform attach ảnh nếu file ở trong project hoặc folder đã cấp bằng `additionalReadRoots`, rồi rewrite path thành `[image1]`. |
193
+ | Chat box trả ra local path ảnh | `Xem lỗi UI trong ảnh ~/Documents/team-screenshots/screenshot.png, chỉ đọc` | Platform attach ảnh nếu file ở trong project hoặc folder đã cấp bằng `additionalReadRoots`, rồi rewrite path thành `[image1]`. |
216
194
  | Nhiều ảnh trong cùng prompt | Dán tối đa 4 path ảnh | Prompt có `[image1]`, `[image2]`, ... |
217
195
  | Ảnh quá lớn | Dùng Pi `read` tool trên file ảnh hoặc resize ảnh trước | Tránh nhồi ảnh quá lớn vào chat input. |
218
196
 
@@ -250,7 +228,7 @@ Tech stack option theo profile:
250
228
  | `data` | Data + database optional | `data=dbt database=postgres` |
251
229
  | `docs` | Docs | `docs=mintlify` |
252
230
 
253
- Sau khi chọn tech, platform tạo `.pi/tech-stack.json` và các file `.pi/tech-context/<tech>.json`. `/onboard run` sẽ đưa các pointer này vào `.pi/context-index.json`. File context chỉ nên chứa tóm tắt ngắn/citation từ Context7, không lưu nguyên văn docs dài, token, session, hoặc secret.
231
+ Sau khi chọn tech, platform tạo `.pi/tech-stack.json` và các file `.pi/tech-context/<tech>.json`. Khi agent onboard project (nhờ trong chat), tool onboarding đưa các pointer này vào `.pi/context-index.json`. File context chỉ nên chứa tóm tắt ngắn/citation từ Context7, không lưu nguyên văn docs dài, token, session, hoặc secret.
254
232
 
255
233
  ## Đọc tài liệu ngoài project
256
234
 
@@ -327,7 +305,7 @@ Các command này thuộc Pi core hoặc package Pi chính. Tên/availability c
327
305
 
328
306
  Các command này đến từ package `pi-subagents`. Tên hơi “package terminology”, nên bảng dưới dịch ra nghĩa thực tế.
329
307
 
330
- Quan trọng: Piagent mặc định parent-direct và helpers `off`. Các lệnh dưới đây phần lớn là capability upstream để inspect/debug. Piagent config chặn builtin, worker, parallel, nested và retry; operator chỉ có thể opt-in một helper read-only context fresh, và runtime vẫn yêu cầu hai lane độc lập cùng projected net saving từ 30%.
308
+ Quan trọng: Piagent mặc định parent-direct và helpers `off`. Các lệnh dưới đây phần lớn là capability upstream để inspect/debug. Piagent config chặn builtin, worker, nested và retry; operator có thể opt-in tối đa hai helper read-only context fresh. Ước tính tiết kiệm token chỉ là telemetry, không còn là điều kiện cho phép (bounded-delegation-v2).
331
309
 
332
310
  | Command | Dịch nghĩa dễ hiểu | Dùng khi nào | Kết quả mong đợi |
333
311
  |---|---|---|---|
@@ -423,10 +401,10 @@ subagent({ action: "status", id: "<run-id>", view: "transcript", lines: 120 })
423
401
  Trong Piagent, helper chỉ được dispatch khi tất cả điều kiện sau đúng:
424
402
 
425
403
  - operator đã bật `PIAGENT_HELPERS_MODE=on`;
426
- - runtime chứng minh ít nhất hai lane độc lập;
427
- - helper không cần chờ output tiếp theo của parent;
428
- - handoff context fresh, không inherit history, tối đa 2.048 token;
429
- - projected tổng token sau cả handoff/merge tiết kiệm ít nhất 30%.
404
+ - tổng số helper của phiên chưa quá 2, và chỉ chạy read-only;
405
+ - handoff context fresh, không inherit history, tối đa 2.048 token.
406
+
407
+ Ước tính tiết kiệm token vẫn được ghi để theo dõi nhưng không quyết định cho phép.
430
408
 
431
409
  Không nên spawn bừa khi:
432
410
 
@@ -441,16 +419,16 @@ Default của platform là an toàn:
441
419
  - `maxSubagentDepth: 1`: parent spawn child, child không fan-out tiếp.
442
420
  - `parallel.concurrency: 1`: compatibility ceiling, không chạy song song.
443
421
  - `asyncByDefault: false`: không tự chạy background nếu anh không yêu cầu.
444
- - Tổng 1 read-only helper, 0 worker, 0 retry.
422
+ - Tối đa 2 read-only helper, 0 worker, 0 retry.
445
423
 
446
- Nếu anh không bật gì thêm, `/workflow task` chạy parent-direct và không tạo model turn phụ. Alias `/task` giữ cùng policy.
424
+ Nếu anh không bật gì thêm, một yêu cầu thường chạy parent-direct và không tạo model turn phụ.
447
425
 
448
426
  ## Prompt mẫu cho bài toán thật
449
427
 
450
428
  ### Platform/package improvement
451
429
 
452
430
  ```text
453
- /workflow platform-improve Improve onboarding, model scope, MCP setup, and verification docs for team usage. Keep workflows public, project-agnostic, and verifiable.
431
+ Improve onboarding, model scope, MCP setup, and verification docs for team usage. Keep everything public, project-agnostic, and verifiable.
454
432
  ```
455
433
 
456
434
  Khi muốn tách rõ agents:
@@ -467,19 +445,19 @@ Use piagent-reviewer before final.
467
445
 
468
446
  ```text
469
447
  /profile be-readonly-fe
470
- /workflow be-to-fe Implement FE support for <endpoint/spec>. Scout backend read-only, map contract, then edit frontend only.
448
+ Implement FE support for <endpoint/spec>. Scout backend read-only, map contract, then edit frontend only.
471
449
  ```
472
450
 
473
451
  Nếu muốn parallel read-only:
474
452
 
475
453
  ```text
476
- Keep the parent direct. If helper mode was explicitly enabled and the runtime proves at least 30% net saving, run one fresh read-only piagent-scout for the single highest-value independent lane.
454
+ Keep the parent direct. If helper mode is enabled, run one fresh read-only piagent-scout for the highest-value independent lane.
477
455
  ```
478
456
 
479
457
  ### Review trước khi ship
480
458
 
481
459
  ```text
482
- /review current diff
460
+ Review diff hiện tại: correctness, test còn thiếu, scope drift. Chỉ đọc, không sửa.
483
461
  ```
484
462
 
485
463
  Hoặc chia reviewer:
@@ -494,9 +472,9 @@ Các lệnh này chạy ngoài Pi.
494
472
 
495
473
  | Command | Dùng khi nào |
496
474
  |---|---|
497
- | `npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.86.1` | Cài Pi CLI tương thích với release hiện tại. |
498
- | `npm install -g --ignore-scripts @piagent/platform@1.7.1` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
499
- | `pi install git:github.com/Vt-mmm/piagent@v1.7.1` | Cài pinned release khi cần reproducible team setup. |
475
+ | `npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.87.1` | Cài Pi CLI tương thích với release hiện tại. |
476
+ | `npm install -g --ignore-scripts @piagent/platform@1.9.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
477
+ | `pi install git:github.com/Vt-mmm/piagent@v1.9.0` | Cài pinned release khi cần reproducible team setup. |
500
478
  | `pi install git:github.com/Vt-mmm/piagent` | Cài latest package platform cho máy cá nhân/sandbox. |
501
479
  | `piagent-update --check` | Báo version hiện tại vs version sẽ lên cho cả ba thành phần; không cài gì. |
502
480
  | `piagent-update` | Full update global một lệnh cho cả máy: Pi host → npm-global helper → Pi package, đúng thứ tự release yêu cầu. |
@@ -5,7 +5,7 @@
5
5
 
6
6
  Không nhồi toàn bộ repo vào context. Agent phải load đúng lớp context theo task.
7
7
 
8
- Lần đầu gắn project vào platform, chạy `/onboard run` sau login/model selection để tạo `.pi/project-context.md`, `.pi/context-index.json` và local Context Engine index. Các task sau dùng index như bản đồ nhỏ để tìm đúng vùng cần đọc, rồi vẫn verify bằng files task-specific hiện tại.
8
+ Lần đầu gắn project vào platform, nhờ agent onboard project (lời thường) sau login/model selection để tạo `.pi/project-context.md`, `.pi/context-index.json` và local Context Engine index. Các task sau dùng index như bản đồ nhỏ để tìm đúng vùng cần đọc, rồi vẫn verify bằng files task-specific hiện tại.
9
9
 
10
10
  ## Context order
11
11
 
@@ -38,9 +38,9 @@ Trước task lớn/risk cao trong Pi TUI:
38
38
 
39
39
  Với task/phase tiếp theo trong cùng phiên hiển thị, runtime tự tạo working set
40
40
  gọn trước mỗi provider call; người dùng không phải mở session mới chỉ để đổi từ
41
- scout sang plan, implement hay verify. `/fresh <workflow>` vẫn là đường phục hồi
42
- tường minh cho mọi workflow canonical khi preflight xác định input quá lớn hoặc
43
- working set không thể rút gọn an toàn; `/fresh help` liệt kê catalog hiện hành.
41
+ scout sang plan, implement hay verify. Khi preflight xác định input quá lớn hoặc
42
+ working set không thể rút gọn an toàn, mở session mới bằng `/new` của Pi
43
+ (`/fresh` đã bỏ từ bản 1.9.0).
44
44
 
45
45
  ## Context manifest
46
46
 
@@ -113,7 +113,7 @@ working set, không phải giới hạn năng lực hay context window của mod
113
113
  - Dùng `/context search` hoặc `piagent_context_index_search` để tìm điểm vào repo, nhưng không dùng index thay thế việc đọc source thật.
114
114
  - Dùng `/context rebuild` sau structural changes; incremental refresh tái sử dụng file không đổi.
115
115
  - Context pack low-confidence chỉ được mở rộng bằng một bounded finder pass, không loop scout vô hạn.
116
- - Không raw-read hoặc raw-edit `.pi/context-index.json` trong task thường ngày. Runtime coi index là advisory state, sanitize khi đọc qua tool/command, và ghi qua `/onboard run` hoặc `piagent_context_index_record`.
116
+ - Không raw-read hoặc raw-edit `.pi/context-index.json` trong task thường ngày. Runtime coi index là advisory state, sanitize khi đọc qua tool/command, và ghi qua lượt onboard hoặc `piagent_context_index_record`.
117
117
  - File context vượt hard cap phải được summarize hoặc đọc targeted slices, không inject full.
118
118
  - Nếu input quá dài thật, lưu intake vào file project/local gitignored rồi reference file; không dán toàn bộ spec vào một turn.
119
119
  - Nếu input chứa local screenshot/image path, để input guard attach thành `[image1]` thay vì đọc ảnh như text context. Ảnh lớn hơn giới hạn chat nên dùng Pi `read` để resize.
@@ -15,9 +15,9 @@ Repo này phải chạy được cho nhiều project/domain khác nhau. Vì vậ
15
15
 
16
16
  | Use case | Package source |
17
17
  |---|---|
18
- | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.7.1` |
18
+ | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.9.0` |
19
19
  | Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
20
- | Registry distribution | `npm:@piagent/platform@1.7.1` |
20
+ | Registry distribution | `npm:@piagent/platform@1.9.0` |
21
21
  | Enterprise npm (fork under another scope) | `npm:@your-scope/platform@x.y.z` |
22
22
  | Local platform dev | `/path/to/piagent` |
23
23
 
@@ -27,7 +27,7 @@ Latest tiện cho máy cá nhân muốn nhận cập nhật nhanh. Pin tag/commi
27
27
 
28
28
  | Channel | Command | Target | Policy |
29
29
  |---|---|---|---|
30
- | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.7.1` | Install the Pi package matching the helper. |
30
+ | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.8.0` | Install the Pi package matching the helper. |
31
31
  | `exact` | `bash scripts/install-global.sh --version vX.Y.Z --resolve-tag` | Requested tag resolved to commit SHA | Pi-package-only rollout, rollback, and incident recovery. |
32
32
  | `dev` | `bash scripts/install-global.sh --dev` | Moving Git source | Personal/sandbox only; do not commit into project settings. |
33
33
  | `local` | `bash scripts/install-global.sh --local` | Current checkout path | Platform development only. |
@@ -54,7 +54,7 @@ Root `package.json` có `pi` manifest trỏ tới:
54
54
  Do đó team có thể:
55
55
 
56
56
  ```bash
57
- pi install git:github.com/Vt-mmm/piagent@v1.7.1
57
+ pi install git:github.com/Vt-mmm/piagent@v1.9.0
58
58
  ```
59
59
 
60
60
  Không cần biết internal folder `packages/piagent-core`. Source không pin chỉ dành cho personal/sandbox như bảng channel ở trên.
@@ -65,13 +65,13 @@ Team nên install global package một lần:
65
65
 
66
66
  ```bash
67
67
  node --version # >= 22.19.0
68
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.86.1
69
- npm install -g --ignore-scripts @piagent/platform@1.7.1
68
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.87.1
69
+ npm install -g --ignore-scripts @piagent/platform@1.9.0
70
70
  piagent-install --stable --dry-run
71
71
  piagent-install --stable
72
72
  ```
73
73
 
74
- `pi install git:github.com/Vt-mmm/piagent@v1.7.1` vẫn hợp lệ nếu chỉ cần cài Pi package. Lệnh đó không tự tạo các binary terminal `piagent-*`; muốn có helper global thì dùng `npm install -g --ignore-scripts @piagent/platform@1.7.1`.
74
+ `pi install git:github.com/Vt-mmm/piagent@v1.9.0` vẫn hợp lệ nếu chỉ cần cài Pi package. Lệnh đó không tự tạo các binary terminal `piagent-*`; muốn có helper global thì dùng `npm install -g --ignore-scripts @piagent/platform@1.9.0`.
75
75
 
76
76
  Support matrix hiện tại: macOS Apple Silicon + Bash và Linux x64 + Bash đã được verify; macOS Intel + Bash và Linux ARM64 + Bash là supported target cần chạy smoke trước rollout; native Windows chưa phải target rollout team; WSL2 experimental. Chi tiết và version runtime nằm trong [release/install policy](release-install-policy.md).
77
77
 
@@ -82,7 +82,7 @@ cd /path/to/project
82
82
  pi
83
83
  ```
84
84
 
85
- Project profile được chọn trong Pi bằng `/onboard` hoặc `/profile`, không bắt buộc chạy bash init. `/onboard` là menu runtime; dùng `/onboard run` khi muốn model đọc project lần đầu và ghi snapshot.
85
+ Project profile được chọn trong Pi bằng `/profile`, không bắt buộc chạy bash init. Muốn model đọc project lần đầu và ghi snapshot, nhờ agent bằng lời thường (từ bản 1.9.0 không còn `/onboard`).
86
86
 
87
87
  Sau setup, bước first-run trong Pi là:
88
88
 
@@ -91,28 +91,25 @@ Sau setup, bước first-run trong Pi là:
91
91
  <select provider/model>
92
92
  /mcp
93
93
  /subagents-doctor
94
- /onboard
95
- /onboard run
94
+ /profile setup
96
95
  /context index
97
96
  /memory
98
97
  ```
99
98
 
100
- `/onboard run` ghi `.pi/project-context.md`; đây là snapshot context dùng chung cho các task sau.
99
+ rồi nhờ agent: "Đọc project này (chỉ đọc) và ghi lại project context." Lượt onboard ghi `.pi/project-context.md`; đây là snapshot context dùng chung cho các task sau.
101
100
  Nó cũng ghi `.pi/context-index.json`; đây là compact advisory map có citation để agent tìm đúng điểm vào repo mà không scout rộng lại.
102
101
 
103
- Command hằng ngày nên dạy theo namespace mới:
102
+ Hằng ngày, việc được yêu cầu bằng lời thường; các command cần dạy là thiết lập và màn hình chỉ đọc:
104
103
 
105
104
  ```text
106
- /commands
107
- /workflow task <request>
108
- /workflow scout <read-only request>
109
105
  /name <task/session name>
110
- /fresh task <request>
111
106
  /context preflight
112
107
  /usage
108
+ /permission
109
+ /piagent-inspector
113
110
  ```
114
111
 
115
- Các alias cũ như `/task`, `/scout`, `/context index`, `/fresh-task` vẫn chạy để không gãy session cũ, nhưng không dùng làm đường onboard chính cho team mới.
112
+ `/workflow`, `/task`, `/scout`, `/fresh`, `/onboard` và `/commands` đã bỏ từ bản 1.9.0. Session nặng thì mở session mới bằng `/new` của Pi.
116
113
 
117
114
  ## Optional preseed setup
118
115
 
@@ -121,7 +118,7 @@ Nếu muốn commit sẵn `.pi/piagent-profile.json` vào repo hoặc bootstrap
121
118
  ```bash
122
119
  bash scripts/setup.sh /path/to/project \
123
120
  --profile be-readonly-fe \
124
- --package-source git:github.com/Vt-mmm/piagent@v1.7.1 \
121
+ --package-source git:github.com/Vt-mmm/piagent@v1.9.0 \
125
122
  --mcp-preset core \
126
123
  --subagents-preset safe
127
124
  ```
@@ -216,7 +213,7 @@ piagent-update --version X.Y.Z --project /path/to/project
216
213
  Sequence thủ công tương đương:
217
214
 
218
215
  ```bash
219
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.86.1
216
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.87.1
220
217
  npm install -g --ignore-scripts @piagent/platform@X.Y.Z
221
218
  piagent-install --stable --dry-run
222
219
  piagent-install --stable