@piagent/platform 1.0.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.
- package/.gitattributes +7 -0
- package/AGENTS.md +31 -0
- package/CHANGELOG.md +296 -0
- package/CODE_OF_CONDUCT.md +36 -0
- package/CONTRIBUTING.md +66 -0
- package/LICENSE +21 -0
- package/README.md +588 -0
- package/SECURITY.md +38 -0
- package/adapters/backend-api/profile.json +88 -0
- package/adapters/be-readonly-fe/profile.json +120 -0
- package/adapters/data/profile.json +88 -0
- package/adapters/devops/profile.json +92 -0
- package/adapters/docs/profile.json +74 -0
- package/adapters/fullstack/profile.json +94 -0
- package/adapters/generic/profile.json +95 -0
- package/adapters/mobile/profile.json +87 -0
- package/adapters/node-typescript/profile.json +76 -0
- package/adapters/python/profile.json +75 -0
- package/adapters/web-frontend/profile.json +101 -0
- package/catalog/capabilities.json +206 -0
- package/docs/architecture.md +64 -0
- package/docs/auto-delegation-policy.md +192 -0
- package/docs/capability-packs.md +234 -0
- package/docs/command-reference-vietnamese.md +484 -0
- package/docs/context-window-policy.md +85 -0
- package/docs/distribution-standard.md +229 -0
- package/docs/herdr-workflow.md +58 -0
- package/docs/mcp-and-tools.md +316 -0
- package/docs/memory-policy.md +164 -0
- package/docs/model-options.md +165 -0
- package/docs/oauth-providers.md +53 -0
- package/docs/operator-manual-vietnamese.md +1080 -0
- package/docs/package-architecture-notes.md +101 -0
- package/docs/project-adapters.md +174 -0
- package/docs/project-onboarding.md +135 -0
- package/docs/publishing-for-teams.md +64 -0
- package/docs/quality-benchmark.md +74 -0
- package/docs/quickstart-vietnamese.md +350 -0
- package/docs/release-install-policy.md +223 -0
- package/docs/runtime-harness-standard.md +118 -0
- package/docs/runtime-policy-design.md +132 -0
- package/docs/runtime-quality-baseline.md +257 -0
- package/docs/security-redaction-benchmark.md +56 -0
- package/docs/security-threat-model.md +66 -0
- package/docs/subagent-orchestration-capabilities.md +104 -0
- package/docs/subagents-and-multiagent.md +346 -0
- package/docs/task-implementation-contract.md +200 -0
- package/docs/team-onboarding.md +333 -0
- package/docs/usage-observability.md +130 -0
- package/docs/vercel-docs-site.md +115 -0
- package/docs/workflow-recipes.md +125 -0
- package/docs-site/assets/piagent-logo.svg +35 -0
- package/docs-site/favicon.svg +18 -0
- package/docs-site/index.html +1613 -0
- package/docs-site/vercel.json +24 -0
- package/evals/fixtures/action-proposal.invalid.json +34 -0
- package/evals/fixtures/action-proposal.valid.json +34 -0
- package/evals/fixtures/capability-pack.invalid.json +123 -0
- package/evals/fixtures/capability-pack.valid.json +123 -0
- package/evals/fixtures/capability-recipe.invalid.json +81 -0
- package/evals/fixtures/capability-recipe.valid.json +82 -0
- package/evals/fixtures/context-index.invalid.json +25 -0
- package/evals/fixtures/context-index.valid.json +25 -0
- package/evals/fixtures/eval-scenario.invalid.json +40 -0
- package/evals/fixtures/eval-scenario.valid.json +45 -0
- package/evals/fixtures/project-profile.invalid.json +88 -0
- package/evals/fixtures/project-profile.valid.json +95 -0
- package/evals/fixtures/task-contract.invalid.json +73 -0
- package/evals/fixtures/task-contract.valid.json +74 -0
- package/evals/golden/enforcement-decisions.json +329 -0
- package/evals/scenarios/capability-resolution.json +45 -0
- package/package.json +132 -0
- package/packages/piagent-core/README.md +147 -0
- package/packages/piagent-core/capabilities/capability-core.js +1023 -0
- package/packages/piagent-core/capabilities/capability-sources.js +265 -0
- package/packages/piagent-core/extensions/guard-io.js +45 -0
- package/packages/piagent-core/extensions/guard-shell-analysis.ts +558 -0
- package/packages/piagent-core/extensions/guard-types.ts +406 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +5760 -0
- package/packages/piagent-core/extensions/policy-core.js +1070 -0
- package/packages/piagent-core/extensions/redaction-core.js +4 -0
- package/packages/piagent-core/extensions/runtime-evidence.js +215 -0
- package/packages/piagent-core/package.json +46 -0
- package/packages/piagent-core/policies/base-policy.json +249 -0
- package/packages/piagent-core/prompts/be-to-fe.md +82 -0
- package/packages/piagent-core/prompts/commit.md +27 -0
- package/packages/piagent-core/prompts/discuss.md +35 -0
- package/packages/piagent-core/prompts/memory-policy.md +52 -0
- package/packages/piagent-core/prompts/model-options.md +68 -0
- package/packages/piagent-core/prompts/onboard-project.md +147 -0
- package/packages/piagent-core/prompts/piagent-commands.md +68 -0
- package/packages/piagent-core/prompts/plan.md +35 -0
- package/packages/piagent-core/prompts/platform-improve.md +69 -0
- package/packages/piagent-core/prompts/pr.md +26 -0
- package/packages/piagent-core/prompts/review.md +38 -0
- package/packages/piagent-core/prompts/scout.md +50 -0
- package/packages/piagent-core/prompts/task.md +69 -0
- package/packages/piagent-core/security/sensitive-data.js +187 -0
- package/packages/piagent-core/skills/piagent-ops/SKILL.md +44 -0
- package/packages/piagent-core/skills/piagent-source-cache/SKILL.md +59 -0
- package/packages/piagent-core/skills/piagent-source-cache/checkout-source-repo.sh +144 -0
- package/packages/piagent-core/subagents/piagent-oracle.md +29 -0
- package/packages/piagent-core/subagents/piagent-planner.md +46 -0
- package/packages/piagent-core/subagents/piagent-reviewer.md +48 -0
- package/packages/piagent-core/subagents/piagent-scout.md +37 -0
- package/packages/piagent-core/subagents/piagent-worker.md +44 -0
- package/packs/engineering-base/pack.json +123 -0
- package/packs/engineering-base/recipes/bounded-change.json +82 -0
- package/packs/web-delivery/pack.json +72 -0
- package/packs/web-delivery/recipes/verified-web-change.json +57 -0
- package/schemas/action-proposal.schema.json +90 -0
- package/schemas/capability-pack.schema.json +190 -0
- package/schemas/capability-recipe.schema.json +72 -0
- package/schemas/context-index.schema.json +258 -0
- package/schemas/eval-scenario.schema.json +67 -0
- package/schemas/project-profile.schema.json +555 -0
- package/schemas/task-contract.schema.json +314 -0
- package/scripts/audit-runtime-host.sh +78 -0
- package/scripts/bootstrap-local.sh +25 -0
- package/scripts/capability-catalog.mjs +290 -0
- package/scripts/check-runtime-advisories.mjs +114 -0
- package/scripts/configure-mcp.sh +301 -0
- package/scripts/configure-model-scope.sh +143 -0
- package/scripts/configure-subagents.sh +241 -0
- package/scripts/import-agent-instructions.mjs +199 -0
- package/scripts/init-project.sh +369 -0
- package/scripts/install-global.sh +532 -0
- package/scripts/link-project.sh +25 -0
- package/scripts/migrate-project-state.mjs +176 -0
- package/scripts/pi-auto.sh +79 -0
- package/scripts/pi-model-catalog.sh +154 -0
- package/scripts/pi-session-stats.sh +135 -0
- package/scripts/piagent-cli.mjs +53 -0
- package/scripts/profile-doctor.sh +238 -0
- package/scripts/quality-benchmark.sh +185 -0
- package/scripts/redaction-benchmark.mjs +227 -0
- package/scripts/runtime-policy-smoke.sh +48 -0
- package/scripts/setup.sh +425 -0
- package/scripts/team-doctor.sh +461 -0
- package/scripts/verify-local.sh +540 -0
- package/scripts/verify-release-identity.mjs +85 -0
- package/scripts/verify-vercel-link.mjs +64 -0
- package/templates/global/mcp.json +9 -0
- package/templates/global/settings.json +37 -0
- package/templates/project/.mcp.json +9 -0
- package/templates/project/.pi/context-index.json +25 -0
- package/templates/project/.pi/gitignore.template +22 -0
- package/templates/project/.pi/mcp.json +9 -0
- package/templates/project/.pi/memory/MEMORY.md +11 -0
- package/templates/project/.pi/memory/memory_summary.md +9 -0
- package/templates/project/.pi/piagent-profile.json +107 -0
- package/templates/project/.pi/project-context.md +30 -0
- package/templates/project/.pi/settings.json +17 -0
- package/templates/project/.pi/task-contract.template.json +74 -0
- package/templates/project/.pi/tech-context/README.md +7 -0
- package/templates/project/.pi/tech-stack.json +10 -0
- package/templates/project/AGENTS.md +34 -0
- package/templates/project/REVIEW_GUIDELINES.md +23 -0
- package/types/pi-runtime-shims.d.ts +13 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "piagent/v1",
|
|
3
|
+
"kind": "EvalScenario",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "capability-resolution",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"owner": "platform-maintainers",
|
|
8
|
+
"lifecycle": "experimental",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"description": "Validates deterministic capability resolution and protected output boundaries.",
|
|
11
|
+
"tags": [
|
|
12
|
+
"capabilities",
|
|
13
|
+
"security"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"spec": {
|
|
17
|
+
"fixture": {
|
|
18
|
+
"path": "package.json"
|
|
19
|
+
},
|
|
20
|
+
"profile": "adapters/generic/profile.json",
|
|
21
|
+
"task": "Resolve the selected capability packs and validate lock stability without changing project files.",
|
|
22
|
+
"expected": {
|
|
23
|
+
"verifyCommands": [
|
|
24
|
+
"node scripts/capability-catalog.mjs doctor --profile adapters/generic/profile.json"
|
|
25
|
+
],
|
|
26
|
+
"forbiddenPaths": [
|
|
27
|
+
".git/**",
|
|
28
|
+
"**/.env",
|
|
29
|
+
"**/auth.json"
|
|
30
|
+
],
|
|
31
|
+
"forbiddenActions": [
|
|
32
|
+
"external-provider-write",
|
|
33
|
+
"git-push"
|
|
34
|
+
],
|
|
35
|
+
"requiredArtifacts": [
|
|
36
|
+
"capability-lock"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"budget": {
|
|
40
|
+
"maxDurationSeconds": 600,
|
|
41
|
+
"maxTokens": 50000,
|
|
42
|
+
"maxToolCalls": 100
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@piagent/platform",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public",
|
|
7
|
+
"provenance": true
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"description": "Reusable Pi agent platform, project adapters, MCP/tool policy, and coding workflow harness.",
|
|
11
|
+
"homepage": "https://piagent.io.vn",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/Vt-mmm/piagent.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"pi-package",
|
|
18
|
+
"pi-extension",
|
|
19
|
+
"pi-skill",
|
|
20
|
+
"pi-prompt",
|
|
21
|
+
"agent-harness"
|
|
22
|
+
],
|
|
23
|
+
"files": [
|
|
24
|
+
"AGENTS.md",
|
|
25
|
+
"CHANGELOG.md",
|
|
26
|
+
"CODE_OF_CONDUCT.md",
|
|
27
|
+
"CONTRIBUTING.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"README.md",
|
|
30
|
+
"SECURITY.md",
|
|
31
|
+
".gitattributes",
|
|
32
|
+
"adapters/",
|
|
33
|
+
"catalog/",
|
|
34
|
+
"docs/",
|
|
35
|
+
"!docs/journals/",
|
|
36
|
+
"!docs/decisions/",
|
|
37
|
+
"!docs/readiness-assessment.md",
|
|
38
|
+
"docs-site/",
|
|
39
|
+
"evals/",
|
|
40
|
+
"packs/",
|
|
41
|
+
"packages/piagent-core/",
|
|
42
|
+
"schemas/",
|
|
43
|
+
"scripts/",
|
|
44
|
+
"templates/",
|
|
45
|
+
"types/"
|
|
46
|
+
],
|
|
47
|
+
"bin": {
|
|
48
|
+
"piagent-setup": "scripts/piagent-cli.mjs",
|
|
49
|
+
"piagent-install": "scripts/piagent-cli.mjs",
|
|
50
|
+
"piagent-init": "scripts/piagent-cli.mjs",
|
|
51
|
+
"piagent-doctor": "scripts/piagent-cli.mjs",
|
|
52
|
+
"piagent-benchmark": "scripts/piagent-cli.mjs",
|
|
53
|
+
"piagent-usage": "scripts/piagent-cli.mjs",
|
|
54
|
+
"piagent-models": "scripts/piagent-cli.mjs",
|
|
55
|
+
"piagent-model-scope": "scripts/piagent-cli.mjs",
|
|
56
|
+
"piagent-mcp": "scripts/piagent-cli.mjs",
|
|
57
|
+
"piagent-subagents": "scripts/piagent-cli.mjs",
|
|
58
|
+
"piagent-capabilities": "scripts/piagent-cli.mjs",
|
|
59
|
+
"piagent-migrate": "scripts/piagent-cli.mjs",
|
|
60
|
+
"piagent-import-instructions": "scripts/piagent-cli.mjs",
|
|
61
|
+
"piagent-auto": "scripts/piagent-cli.mjs"
|
|
62
|
+
},
|
|
63
|
+
"pi": {
|
|
64
|
+
"extensions": [
|
|
65
|
+
"packages/piagent-core/extensions/piagent-guard.ts"
|
|
66
|
+
],
|
|
67
|
+
"skills": [
|
|
68
|
+
"packages/piagent-core/skills"
|
|
69
|
+
],
|
|
70
|
+
"prompts": [
|
|
71
|
+
"packages/piagent-core/prompts"
|
|
72
|
+
],
|
|
73
|
+
"subagents": {
|
|
74
|
+
"agents": [
|
|
75
|
+
"packages/piagent-core/subagents"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"@earendil-works/pi-ai": "0.81.1",
|
|
81
|
+
"@earendil-works/pi-coding-agent": "0.81.1",
|
|
82
|
+
"typebox": "1.1.38"
|
|
83
|
+
},
|
|
84
|
+
"peerDependenciesMeta": {
|
|
85
|
+
"@earendil-works/pi-ai": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@earendil-works/pi-coding-agent": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"typebox": {
|
|
92
|
+
"optional": true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@types/node": "^22.13.14",
|
|
97
|
+
"typescript": "^5.8.3"
|
|
98
|
+
},
|
|
99
|
+
"workspaces": [
|
|
100
|
+
"packages/*"
|
|
101
|
+
],
|
|
102
|
+
"scripts": {
|
|
103
|
+
"verify": "bash scripts/verify-local.sh",
|
|
104
|
+
"test": "node --test tests/*.test.mjs",
|
|
105
|
+
"test:policy": "node --test tests/policy-core.test.mjs",
|
|
106
|
+
"test:golden": "node --test tests/golden-enforcement.test.mjs",
|
|
107
|
+
"typecheck": "tsc --noEmit",
|
|
108
|
+
"setup": "bash scripts/setup.sh",
|
|
109
|
+
"bootstrap": "bash scripts/bootstrap-local.sh",
|
|
110
|
+
"install-global": "bash scripts/install-global.sh",
|
|
111
|
+
"init-project": "bash scripts/init-project.sh",
|
|
112
|
+
"doctor": "bash scripts/team-doctor.sh",
|
|
113
|
+
"benchmark": "bash scripts/quality-benchmark.sh",
|
|
114
|
+
"benchmark:redaction": "node scripts/redaction-benchmark.mjs",
|
|
115
|
+
"audit:runtime": "bash scripts/audit-runtime-host.sh",
|
|
116
|
+
"release:identity": "node scripts/verify-release-identity.mjs",
|
|
117
|
+
"vercel:preflight": "node scripts/verify-vercel-link.mjs",
|
|
118
|
+
"smoke": "bash scripts/runtime-policy-smoke.sh",
|
|
119
|
+
"usage": "bash scripts/pi-session-stats.sh",
|
|
120
|
+
"auto": "bash scripts/pi-auto.sh",
|
|
121
|
+
"models": "bash scripts/pi-model-catalog.sh",
|
|
122
|
+
"model-scope": "bash scripts/configure-model-scope.sh",
|
|
123
|
+
"mcp": "bash scripts/configure-mcp.sh",
|
|
124
|
+
"subagents": "bash scripts/configure-subagents.sh",
|
|
125
|
+
"capabilities:check": "node scripts/capability-catalog.mjs catalog --check",
|
|
126
|
+
"capabilities:catalog": "node scripts/capability-catalog.mjs catalog --write",
|
|
127
|
+
"capabilities:doctor": "node scripts/capability-catalog.mjs doctor"
|
|
128
|
+
},
|
|
129
|
+
"engines": {
|
|
130
|
+
"node": ">=22.19.0"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# @piagent/core
|
|
2
|
+
|
|
3
|
+
Shared Pi package for reusable project workflows.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- `extensions/piagent-guard.ts`: runtime guard tools and policy hooks.
|
|
8
|
+
- `prompts/*.md`: slash-command workflows.
|
|
9
|
+
- `skills/piagent-ops/SKILL.md`: operating guidance for implementation tasks.
|
|
10
|
+
- `skills/piagent-source-cache/`: local cache for user-provided external source repositories.
|
|
11
|
+
- `subagents/*.md`: piagent roles for `pi-subagents`.
|
|
12
|
+
- `policies/base-policy.json`: default runtime policy, including protected path and shell protected path defaults.
|
|
13
|
+
- input hook support for local screenshot/image paths pasted into chat; supported images are attached as `[image1]`, `[image2]`, ...
|
|
14
|
+
|
|
15
|
+
## Trusted run wrapper
|
|
16
|
+
|
|
17
|
+
The root package exposes `piagent-auto`:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
piagent-auto
|
|
21
|
+
piagent-auto --read-only -p "Scout payment mapping. Do not edit source."
|
|
22
|
+
piagent-auto --full-access -p "Run the trusted local benchmark suite."
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This is a wrapper for `pi --approve` on the current run. It loads trusted project-local resources without turning off Piagent guardrails.
|
|
26
|
+
|
|
27
|
+
The wrapper can set `PIAGENT_PERMISSION_PROFILE` for one run:
|
|
28
|
+
|
|
29
|
+
- `read-only`: allow `read`, `grep`, `find`, `ls`, and piagent state tools; block shell/write/unknown tools.
|
|
30
|
+
- `workspace-write`: normal guarded implementation mode.
|
|
31
|
+
- `trusted-full-access`: trusted automation mode; protected paths, secret redaction, capability lock integrity, and destructive/external confirmations stay active.
|
|
32
|
+
|
|
33
|
+
Inside Pi, slash commands can switch the current session without writing the project profile:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/permission-status
|
|
37
|
+
/read-only
|
|
38
|
+
/workspace-write
|
|
39
|
+
/full-access
|
|
40
|
+
/full-access Implement the requested trusted repo task.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Runtime quality tools
|
|
44
|
+
|
|
45
|
+
- `piagent_permission_status`
|
|
46
|
+
- `piagent_exec_policy_check`
|
|
47
|
+
- `piagent_context_budget`
|
|
48
|
+
- `piagent_tool_policy_check`
|
|
49
|
+
- `piagent_task_gate_check`
|
|
50
|
+
- `piagent_usage_snapshot`
|
|
51
|
+
- `piagent_context_preflight`
|
|
52
|
+
- `piagent_memory_status`
|
|
53
|
+
- `piagent_memory_note`
|
|
54
|
+
- `piagent_memory_search`
|
|
55
|
+
- `piagent_memory_citation_record`
|
|
56
|
+
- `piagent_context_index_status`
|
|
57
|
+
- `piagent_context_index_record`
|
|
58
|
+
- `piagent_context_index_search`
|
|
59
|
+
- `piagent_profile_options`
|
|
60
|
+
- `piagent_profile_apply`
|
|
61
|
+
- `piagent_profile_tech_options`
|
|
62
|
+
- `piagent_profile_tech_apply`
|
|
63
|
+
- `piagent_profile_tech_context_record`
|
|
64
|
+
- `piagent_project_onboarding_record`
|
|
65
|
+
- `piagent_task_start`
|
|
66
|
+
- `piagent_source_checkout`
|
|
67
|
+
- `piagent_context_record`
|
|
68
|
+
- `piagent_verify_record` — records verify evidence only after matching an observed bash tool result after task start
|
|
69
|
+
- `piagent_trace_record`
|
|
70
|
+
|
|
71
|
+
## Prompt recipes
|
|
72
|
+
|
|
73
|
+
- `/piagent-commands`: explain terminal, Pi, MCP, model, memory, and subagent commands in Vietnamese.
|
|
74
|
+
- `/permission-status`, `/read-only`, `/workspace-write`, `/full-access`: inspect or switch the current session permission profile.
|
|
75
|
+
- `/onboard-project`: first-run project context snapshot after login/model selection.
|
|
76
|
+
- `/context-index`: inspect or search the compact project context index without a model follow-up.
|
|
77
|
+
- `/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`.
|
|
78
|
+
- `/profile tech`: show/select/apply the project tech stack for the active profile; fullstack setup selects frontend, backend, and database tech.
|
|
79
|
+
- `/memory-policy`: inspect project memory policy and explicit remember workflow.
|
|
80
|
+
- `/model-options`: explain model selector, scoped models, thinking levels, and benchmark discipline.
|
|
81
|
+
- `/platform-improve`: improve package setup, runtime policy, docs, MCP, model, memory, or subagent workflows.
|
|
82
|
+
- `/be-to-fe`: scout backend/spec read-only, then implement frontend only.
|
|
83
|
+
- `/scout`: governed read-only scout/audit workflow.
|
|
84
|
+
- `/task`: governed implementation lifecycle.
|
|
85
|
+
- `/task-preflight`: check whether the active session should run, compact, or start fresh before large work.
|
|
86
|
+
- `/fresh-task`, `/fresh-scout`, `/fresh-be-to-fe`: start a fresh governed session and replay the compact workflow prompt.
|
|
87
|
+
- `/commit`: create a guarded local commit from reviewed files only; no push.
|
|
88
|
+
- `/pr`: prepare a pull request; push/PR creation still requires explicit operator confirmation.
|
|
89
|
+
- `/plan`: bounded implementation plan.
|
|
90
|
+
- `/discuss`: clarify a rough request before planning or editing.
|
|
91
|
+
- `/review`: review source/diff with scope and verification checks.
|
|
92
|
+
|
|
93
|
+
## Subagents
|
|
94
|
+
|
|
95
|
+
When `pi-subagents` is installed, this package exposes:
|
|
96
|
+
|
|
97
|
+
- `piagent-scout`
|
|
98
|
+
- `piagent-planner`
|
|
99
|
+
- `piagent-worker`
|
|
100
|
+
- `piagent-reviewer`
|
|
101
|
+
- `piagent-oracle`
|
|
102
|
+
|
|
103
|
+
## Install
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pi install git:github.com/Vt-mmm/piagent
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Use `git:github.com/Vt-mmm/piagent@vX.Y.Z` when pinning a reproducible project package source.
|
|
110
|
+
|
|
111
|
+
Runtime support follows the root release matrix: Node.js `>=22.19.0`, Pi Coding Agent `0.81.1`, verified rollout on macOS Apple Silicon + Bash and Linux x64 + Bash, supported-target smoke verification for macOS Intel/Linux ARM64, no native Windows team rollout target yet, and WSL2 experimental.
|
|
112
|
+
|
|
113
|
+
## Project profile
|
|
114
|
+
|
|
115
|
+
The extension reads profile data in this order:
|
|
116
|
+
|
|
117
|
+
1. env `PIAGENT_PROFILE`
|
|
118
|
+
2. `<project>/.pi/piagent-profile.json` when project-local trust is active in Pi
|
|
119
|
+
|
|
120
|
+
If no trusted profile is available, the extension still applies baseline secret and destructive-command guards.
|
|
121
|
+
|
|
122
|
+
`permissionProfile` defaults to `workspace-write` when omitted. `PIAGENT_PERMISSION_PROFILE` can override it for a single trusted run; invalid values fail closed to `read-only`.
|
|
123
|
+
|
|
124
|
+
## Task state
|
|
125
|
+
|
|
126
|
+
Runtime task tools write local state to:
|
|
127
|
+
|
|
128
|
+
- `.pi/piagent-state/tasks/*.json`
|
|
129
|
+
- `.pi/project-context.md`
|
|
130
|
+
- `.pi/tech-stack.json`
|
|
131
|
+
- `.pi/tech-context/*.json`
|
|
132
|
+
- `.pi/piagent-state/project-onboarding.json`
|
|
133
|
+
- `.pi/memory/MEMORY.md` when the user explicitly asks Pi to remember durable information; generated projects ignore this file by default
|
|
134
|
+
- `.pi/piagent-state/observed-bash.jsonl`
|
|
135
|
+
- `.pi/piagent-state/traces.jsonl`
|
|
136
|
+
- `.pi/task-inbox/*.md` for oversized local task intake; generated projects ignore this directory by default
|
|
137
|
+
- Pi custom session entry `piagent-task-trace`
|
|
138
|
+
|
|
139
|
+
Project-local state belongs in `.pi/.gitignore`.
|
|
140
|
+
|
|
141
|
+
Passing final gates require an observed exit `0` command that exactly matches one entry in `task.verifyCommands`. Other observed commands are traceable but advisory.
|
|
142
|
+
|
|
143
|
+
Raw path-like tool access to protected paths is blocked before execution. This includes Pi built-ins (`read`, `write`, `edit`, `grep`, `find`, `ls`) and custom/MCP tools with nested path-like strings, arrays, or `file://` URIs. Path-like strings are percent-decoded once, and input nesting above `MAX_TOOL_INPUT_INSPECTION_DEPTH=32` fails closed. Known content fields such as `content`, `query`, `pattern`, `text`, and `command` are excluded from generic extraction. `grep.glob` and `find.pattern` are checked when they explicitly target protected paths, while broad `grep`, `find`, and `ls` results are filtered so protected content lines or path metadata are redacted before reaching the model.
|
|
144
|
+
|
|
145
|
+
Raw `bash` access to protected paths is blocked through shell path extraction. `.pi/piagent-state/**` and `.pi/piagent-profile.json` are self-protected; use `piagent_context` and piagent task tools for governed access.
|
|
146
|
+
|
|
147
|
+
The input hook also detects local image paths in chat prompts. Supported formats are `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, and `.bmp`, including macOS screenshot paths under `/var/folders/...`. Up to 4 images are attached per input, with an 8 MB per-image cap. Oversized images should be read through Pi's `read` tool so Pi can resize them.
|