@piagent/platform 1.2.2 → 1.2.3

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 (72) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +34 -27
  3. package/catalog/capabilities.json +8 -8
  4. package/docs/auto-delegation-policy.md +4 -4
  5. package/docs/command-reference-vietnamese.md +119 -85
  6. package/docs/context-window-policy.md +7 -7
  7. package/docs/distribution-standard.md +27 -10
  8. package/docs/herdr-workflow.md +3 -2
  9. package/docs/memory-policy.md +6 -3
  10. package/docs/operator-manual-vietnamese.md +81 -72
  11. package/docs/package-architecture-notes.md +6 -6
  12. package/docs/project-adapters.md +4 -4
  13. package/docs/project-onboarding.md +12 -11
  14. package/docs/publishing-for-teams.md +2 -2
  15. package/docs/quickstart-vietnamese.md +25 -23
  16. package/docs/release-install-policy.md +6 -6
  17. package/docs/runtime-harness-standard.md +7 -7
  18. package/docs/runtime-policy-design.md +1 -1
  19. package/docs/runtime-quality-baseline.md +1 -1
  20. package/docs/security-threat-model.md +1 -1
  21. package/docs/subagent-orchestration-capabilities.md +3 -3
  22. package/docs/subagents-and-multiagent.md +4 -4
  23. package/docs/task-implementation-contract.md +4 -4
  24. package/docs/task-lifecycle-vietnamese.md +2 -2
  25. package/docs/team-onboarding.md +22 -18
  26. package/docs/usage-observability.md +13 -12
  27. package/docs/workflow-recipes.md +12 -9
  28. package/docs-site/architecture.html +1 -1
  29. package/docs-site/commands.html +19 -15
  30. package/docs-site/content/commands.html +18 -14
  31. package/docs-site/content/permissions.html +11 -11
  32. package/docs-site/content/quickstart.html +12 -11
  33. package/docs-site/content/team.html +1 -1
  34. package/docs-site/content/workflows.html +17 -17
  35. package/docs-site/index.html +1 -1
  36. package/docs-site/mcp-approval.html +1 -1
  37. package/docs-site/mcp-auth.html +1 -1
  38. package/docs-site/mcp-servers.html +1 -1
  39. package/docs-site/mcp.html +1 -1
  40. package/docs-site/permissions.html +12 -12
  41. package/docs-site/profiles.html +1 -1
  42. package/docs-site/quickstart.html +13 -12
  43. package/docs-site/runtime.html +1 -1
  44. package/docs-site/scope.html +1 -1
  45. package/docs-site/security.html +1 -1
  46. package/docs-site/team.html +2 -2
  47. package/docs-site/workflows.html +18 -18
  48. package/package.json +1 -1
  49. package/packages/piagent-core/README.md +27 -27
  50. package/packages/piagent-core/extensions/piagent-guard.ts +1055 -190
  51. package/packages/piagent-core/package.json +1 -1
  52. package/packages/piagent-core/prompts/be-to-fe.md +3 -3
  53. package/packages/piagent-core/prompts/discuss.md +2 -2
  54. package/packages/piagent-core/prompts/plan.md +1 -1
  55. package/packages/piagent-core/prompts/platform-improve.md +1 -1
  56. package/packages/piagent-core/prompts/pr.md +1 -1
  57. package/packages/piagent-core/prompts/review.md +1 -1
  58. package/packages/piagent-core/prompts/scout.md +2 -2
  59. package/packages/piagent-core/prompts/task.md +2 -2
  60. package/scripts/init-project.sh +4 -3
  61. package/scripts/install-global.sh +47 -1
  62. package/scripts/profile-doctor.sh +1 -1
  63. package/scripts/setup.sh +4 -3
  64. package/scripts/team-doctor.sh +6 -8
  65. package/scripts/verify-local.sh +18 -17
  66. package/templates/project/.pi/context-index.json +2 -2
  67. package/templates/project/.pi/project-context.md +3 -3
  68. package/templates/project/AGENTS.md +4 -4
  69. package/packages/piagent-core/prompts/memory-policy.md +0 -52
  70. package/packages/piagent-core/prompts/model-options.md +0 -68
  71. package/packages/piagent-core/prompts/onboard-project.md +0 -147
  72. package/packages/piagent-core/prompts/piagent-commands.md +0 -69
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.2 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.3 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.2 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.3 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -97,7 +97,7 @@
97
97
  <div class="split">
98
98
  <article class="card">
99
99
  <h3 id="viec-nen-lam">Việc nên làm</h3>
100
- <p>Chạy <span class="inline-code">/onboard-project</span>, áp <span class="inline-code">/profile auto</span>, dùng workflow command, verify thật và ghi blockers rõ ràng.</p>
100
+ <p>Chạy <span class="inline-code">/onboard run</span>, áp <span class="inline-code">/profile auto</span>, dùng <span class="inline-code">/workflow</span>, verify thật và ghi blockers rõ ràng.</p>
101
101
  </article>
102
102
  <article class="card">
103
103
  <h3 id="viec-nen-tranh">Việc nên tránh</h3>
@@ -27,7 +27,7 @@
27
27
  <span>Pi Agent Platform</span>
28
28
  </a>
29
29
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.2 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.3 docs</span>
31
31
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
32
32
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
33
33
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -95,7 +95,7 @@
95
95
  <section class="section">
96
96
  <div class="callout ok-callout">
97
97
  <strong>Git trong Pi Agent</strong>
98
- <p>Không có namespace <span class="inline-code">/git</span> riêng. Dùng <span class="inline-code">/commit</span> để commit local đã review, dùng <span class="inline-code">/pr</span> để chuẩn bị PR. Các hành động như <span class="inline-code">git push</span> hoặc stage rộng <span class="inline-code">git add -A</span> vẫn cần operator xác nhận.</p>
98
+ <p>Không có namespace <span class="inline-code">/git</span> riêng. Dùng <span class="inline-code">/workflow commit</span> để commit local đã review, dùng <span class="inline-code">/workflow pr</span> để chuẩn bị PR. Các hành động như <span class="inline-code">git push</span> hoặc stage rộng <span class="inline-code">git add -A</span> vẫn cần operator xác nhận.</p>
99
99
  </div>
100
100
 
101
101
  <div class="callout">
@@ -105,37 +105,37 @@
105
105
 
106
106
  <div class="command-grid">
107
107
  <article class="command-card">
108
- <header><span>Implementation bounded</span><button class="clip-btn" data-clip="/task Fix the failing checkout test and verify.">Lấy lệnh</button></header>
109
- <pre><code>/task Fix the failing checkout test and verify.</code></pre>
108
+ <header><span>Implementation bounded</span><button class="clip-btn" data-clip="/workflow task Fix the failing checkout test and verify.">Lấy lệnh</button></header>
109
+ <pre><code>/workflow task Fix the failing checkout test and verify.</code></pre>
110
110
  </article>
111
111
  <article class="command-card">
112
- <header><span>Read-only scout</span><button class="clip-btn" data-clip="/scout Map the auth flow and risk areas.">Lấy lệnh</button></header>
113
- <pre><code>/scout Map the auth flow and risk areas.</code></pre>
112
+ <header><span>Read-only scout</span><button class="clip-btn" data-clip="/workflow scout Map the auth flow and risk areas.">Lấy lệnh</button></header>
113
+ <pre><code>/workflow scout Map the auth flow and risk areas.</code></pre>
114
114
  </article>
115
115
  <article class="command-card">
116
- <header><span>Plan trước khi code</span><button class="clip-btn" data-clip="/plan Add multi-tenant billing support.">Lấy lệnh</button></header>
117
- <pre><code>/plan Add multi-tenant billing support.</code></pre>
116
+ <header><span>Plan trước khi code</span><button class="clip-btn" data-clip="/workflow plan Add multi-tenant billing support.">Lấy lệnh</button></header>
117
+ <pre><code>/workflow plan Add multi-tenant billing support.</code></pre>
118
118
  </article>
119
119
  <article class="command-card">
120
- <header><span>Review diff</span><button class="clip-btn" data-clip="/review">Lấy lệnh</button></header>
121
- <pre><code>/review</code></pre>
120
+ <header><span>Review diff</span><button class="clip-btn" data-clip="/workflow review current diff">Lấy lệnh</button></header>
121
+ <pre><code>/workflow review current diff</code></pre>
122
122
  </article>
123
123
  <article class="command-card">
124
- <header><span>Commit local có guard</span><button class="clip-btn" data-clip="/commit &quot;feat: add guarded git workflow&quot;">Lấy lệnh</button></header>
125
- <pre><code>/commit "feat: add guarded git workflow"</code></pre>
124
+ <header><span>Commit local có guard</span><button class="clip-btn" data-clip="/workflow commit &quot;feat: add guarded git workflow&quot;">Lấy lệnh</button></header>
125
+ <pre><code>/workflow commit "feat: add guarded git workflow"</code></pre>
126
126
  </article>
127
127
  <article class="command-card">
128
- <header><span>Chuẩn bị pull request</span><button class="clip-btn" data-clip="/pr &quot;Prepare PR for guarded git workflow&quot;">Lấy lệnh</button></header>
129
- <pre><code>/pr "Prepare PR for guarded git workflow"</code></pre>
128
+ <header><span>Chuẩn bị pull request</span><button class="clip-btn" data-clip="/workflow pr &quot;Prepare PR for guarded git workflow&quot;">Lấy lệnh</button></header>
129
+ <pre><code>/workflow pr "Prepare PR for guarded git workflow"</code></pre>
130
130
  </article>
131
131
  <article class="command-card">
132
- <header><span>Backend spec sang frontend</span><button class="clip-btn" data-clip="/be-to-fe Implement frontend support for the new user status endpoint.">Lấy lệnh</button></header>
132
+ <header><span>Backend spec sang frontend</span><button class="clip-btn" data-clip="/profile be-readonly-fe&#10;/workflow be-to-fe Implement frontend support for the new user status endpoint.">Lấy lệnh</button></header>
133
133
  <pre><code>/profile be-readonly-fe
134
- /be-to-fe Implement frontend support for the new user status endpoint.</code></pre>
134
+ /workflow be-to-fe Implement frontend support for the new user status endpoint.</code></pre>
135
135
  </article>
136
136
  <article class="command-card">
137
- <header><span>Cải thiện platform</span><button class="clip-btn" data-clip="/platform-improve Harden command docs and run verification.">Lấy lệnh</button></header>
138
- <pre><code>/platform-improve Harden command docs and run verification.</code></pre>
137
+ <header><span>Cải thiện platform</span><button class="clip-btn" data-clip="/workflow platform-improve Harden command docs and run verification.">Lấy lệnh</button></header>
138
+ <pre><code>/workflow platform-improve Harden command docs and run verification.</code></pre>
139
139
  </article>
140
140
  </div>
141
141
  </section>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piagent/platform",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -5,7 +5,7 @@ Shared Pi package for reusable project workflows.
5
5
  ## Contents
6
6
 
7
7
  - `extensions/piagent-guard.ts`: runtime guard tools and policy hooks.
8
- - `prompts/*.md`: slash-command workflows.
8
+ - `prompts/*.md`: workflow aliases that intentionally launch an agent turn.
9
9
  - `skills/piagent-ops/SKILL.md`: operating guidance for implementation tasks.
10
10
  - `skills/piagent-source-cache/`: local cache for user-provided external source repositories.
11
11
  - `subagents/*.md`: piagent roles for `pi-subagents`.
@@ -31,16 +31,19 @@ The wrapper can set `PIAGENT_PERMISSION_PROFILE` for one run:
31
31
  - `workspace-write`: normal guarded implementation mode.
32
32
  - `trusted-full-access`: trusted automation mode; protected paths, secret redaction, capability lock integrity, and destructive/external confirmations stay active.
33
33
 
34
- Inside Pi, slash commands can switch the current session without writing the project profile:
34
+ Inside Pi, `/permission` can switch the current session without writing the project profile:
35
35
 
36
36
  ```text
37
- /permission-status
38
- /read-only
39
- /workspace-write
40
- /full-access
41
- /full-access Implement the requested trusted repo task.
37
+ /permission
38
+ /permission status
39
+ /permission read-only
40
+ /permission workspace-write
41
+ /permission full-access
42
+ /permission full-access Implement the requested trusted repo task.
42
43
  ```
43
44
 
45
+ Legacy aliases still work: `/permission-status`, `/read-only`, `/workspace-write`, and `/full-access`.
46
+
44
47
  ## Runtime quality tools
45
48
 
46
49
  - `piagent_permission_status`
@@ -70,28 +73,25 @@ Inside Pi, slash commands can switch the current session without writing the pro
70
73
  - `piagent_verify_record` — records verify evidence only after matching an observed bash tool result after task start
71
74
  - `piagent_trace_record`
72
75
 
73
- ## Prompt recipes
74
-
75
- - `/piagent-commands`: explain terminal, Pi, MCP, model, memory, and subagent commands in Vietnamese.
76
- - `/permission-status`, `/read-only`, `/workspace-write`, `/full-access`: inspect or switch the current session permission profile.
77
- - `/onboard-project`: first-run project context snapshot after login/model selection.
78
- - `/context-index`: inspect or search the compact project context index without a model follow-up.
76
+ ## Runtime commands and workflow recipes
77
+
78
+ - `/commands`: runtime menu/help for terminal, Pi, MCP, model, memory, session, context, permission, and subagent commands.
79
+ - `/workflow`: one launcher for task, scout, BE-to-FE, discuss, plan, review, commit, PR, platform-improve, and onboarding workflows.
80
+ - `/usage`: runtime usage namespace for live snapshot, history hint, preflight, compact, and compact-log captures.
81
+ - `/name`: set the current session name for Agent Watch/report mapping.
82
+ - `/fresh`: open a fresh governed session for `task`, `scout`, or `be-to-fe`.
83
+ - `/context`: runtime context namespace for context index status/search, task preflight, and compact.
84
+ - `/permission`: runtime permission namespace for status/read-only/workspace-write/full-access.
85
+ - `/onboard`: runtime onboarding namespace; `run` launches the first-read onboarding workflow.
86
+ - `/context-index`: legacy alias for `/context index/search`.
79
87
  - `/profile`: show a short profile status, list options, apply a profile directly, or run select-style profile/tech setup without a model follow-up. Short aliases include `fe`, `be`, `full`, and `be-fe`.
80
88
  - `/profile tech`: show/select/apply the project tech stack for the active profile; fullstack setup selects frontend, backend, and database tech.
81
- - `/memory-policy`: inspect project memory policy and explicit remember workflow.
82
- - `/model-options`: explain model selector, scoped models, thinking levels, and benchmark discipline.
83
- - `/platform-improve`: improve package setup, runtime policy, docs, MCP, model, memory, or subagent workflows.
84
- - `/be-to-fe`: scout backend/spec read-only, then implement frontend only.
85
- - `/scout`: governed read-only scout/audit workflow.
86
- - `/task`: governed implementation lifecycle.
87
- - `/task-preflight`: check whether the active session should run, compact, or start fresh before large work.
88
- - `/piagent-logs`: show compact-log policy and recent oversized tool-output captures.
89
- - `/fresh-task`, `/fresh-scout`, `/fresh-be-to-fe`: start a fresh governed session and replay the compact workflow prompt.
90
- - `/commit`: create a guarded local commit from reviewed files only; no push.
91
- - `/pr`: prepare a pull request; push/PR creation still requires explicit operator confirmation.
92
- - `/plan`: bounded implementation plan.
93
- - `/discuss`: clarify a rough request before planning or editing.
94
- - `/review`: review source/diff with scope and verification checks.
89
+ - `/memory` or `/memory-policy`: inspect project memory policy and explicit remember workflow.
90
+ - `/model-options`: show model selector, scoped models, thinking levels, and benchmark discipline without a model follow-up.
91
+ - `/logs`: short alias for `/usage logs`.
92
+ - `/task-preflight`: legacy alias for `/context preflight`.
93
+ - `/fresh-task`, `/fresh-scout`, `/fresh-be-to-fe`: legacy aliases for `/fresh ...`.
94
+ - `/task`, `/scout`, `/be-to-fe`, `/platform-improve`, `/commit`, `/pr`, `/plan`, `/discuss`, `/review`: workflow aliases kept for power users; team docs should teach `/workflow ...` first.
95
95
 
96
96
  ## Subagents
97
97