@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,64 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const repositoryRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
+
const expected = Object.freeze({
|
|
9
|
+
projectId: "prj_k3yqhdVXhwJWH8KC0J17UDulsVpG",
|
|
10
|
+
orgId: "team_XYGedgJi8GJXu25Fg2J7Bz0Q",
|
|
11
|
+
projectName: "pi-agent"
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
function fail(message) {
|
|
15
|
+
process.stderr.write(`FAIL: ${message}\n`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function parseArguments(values) {
|
|
20
|
+
let projectFile = path.join(repositoryRoot, "docs-site", ".vercel", "project.json");
|
|
21
|
+
let provided = false;
|
|
22
|
+
for (let index = 0; index < values.length; index += 1) {
|
|
23
|
+
const option = values[index];
|
|
24
|
+
if (option === "-h" || option === "--help") {
|
|
25
|
+
process.stdout.write("Usage: node scripts/verify-vercel-link.mjs [--project-file <path>]\n");
|
|
26
|
+
process.stdout.write("Verify that local Vercel metadata targets the canonical pi-agent project.\n");
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|
|
29
|
+
if (option !== "--project-file") fail(`unknown option ${option}`);
|
|
30
|
+
if (provided) fail("duplicate option --project-file");
|
|
31
|
+
const value = values[index + 1];
|
|
32
|
+
if (!value || value.startsWith("--")) fail("--project-file requires a value");
|
|
33
|
+
projectFile = path.resolve(value);
|
|
34
|
+
provided = true;
|
|
35
|
+
index += 1;
|
|
36
|
+
}
|
|
37
|
+
return projectFile;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const projectFile = parseArguments(process.argv.slice(2));
|
|
41
|
+
let stat;
|
|
42
|
+
try {
|
|
43
|
+
stat = fs.lstatSync(projectFile);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
fail(`Vercel project metadata is missing at ${projectFile}; run: vercel link --cwd docs-site --project pi-agent`);
|
|
46
|
+
}
|
|
47
|
+
if (stat.isSymbolicLink() || !stat.isFile()) fail("Vercel project metadata must be a regular, non-symlink file");
|
|
48
|
+
if (stat.size < 2 || stat.size > 16 * 1024) fail("Vercel project metadata has an unexpected size");
|
|
49
|
+
|
|
50
|
+
let actual;
|
|
51
|
+
try {
|
|
52
|
+
actual = JSON.parse(fs.readFileSync(projectFile, "utf8"));
|
|
53
|
+
} catch (error) {
|
|
54
|
+
fail(`Vercel project metadata is invalid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
55
|
+
}
|
|
56
|
+
if (!actual || Array.isArray(actual) || typeof actual !== "object") fail("Vercel project metadata must be a JSON object");
|
|
57
|
+
|
|
58
|
+
for (const [key, value] of Object.entries(expected)) {
|
|
59
|
+
if (actual[key] !== value) {
|
|
60
|
+
fail(`Vercel ${key} is ${JSON.stringify(actual[key] ?? null)}; expected ${JSON.stringify(value)}. Relink with: vercel link --cwd docs-site --project pi-agent`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
process.stdout.write(`PASS: Vercel link targets ${expected.projectName} (${expected.projectId})\n`);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defaultProjectTrust": "ask",
|
|
3
|
+
"defaultProvider": "openai-codex",
|
|
4
|
+
"defaultModel": "gpt-5.5",
|
|
5
|
+
"defaultThinkingLevel": "xhigh",
|
|
6
|
+
"showCacheMissNotices": true,
|
|
7
|
+
"enabledModels": [
|
|
8
|
+
"openai-codex/gpt-5.3-codex-spark:minimal",
|
|
9
|
+
"openai-codex/gpt-5.4-mini:minimal",
|
|
10
|
+
"openai-codex/gpt-5.4:xhigh",
|
|
11
|
+
"openai-codex/gpt-5.5:xhigh",
|
|
12
|
+
"openai-codex/gpt-5.6-luna:xhigh",
|
|
13
|
+
"openai-codex/gpt-5.6-sol:xhigh",
|
|
14
|
+
"openai-codex/gpt-5.6-terra:xhigh",
|
|
15
|
+
"anthropic/claude-haiku-4-5:low",
|
|
16
|
+
"anthropic/claude-sonnet-4-5:high",
|
|
17
|
+
"anthropic/claude-sonnet-4-6:max",
|
|
18
|
+
"anthropic/claude-sonnet-5:xhigh",
|
|
19
|
+
"anthropic/claude-opus-4-5:xhigh",
|
|
20
|
+
"anthropic/claude-opus-4-6:max",
|
|
21
|
+
"anthropic/claude-opus-4-7:xhigh",
|
|
22
|
+
"anthropic/claude-opus-4-8:xhigh",
|
|
23
|
+
"anthropic/claude-fable-5:xhigh"
|
|
24
|
+
],
|
|
25
|
+
"compaction": {
|
|
26
|
+
"enabled": true,
|
|
27
|
+
"reserveTokens": 16384,
|
|
28
|
+
"keepRecentTokens": 20000
|
|
29
|
+
},
|
|
30
|
+
"packages": [
|
|
31
|
+
"__PIAGENT_PACKAGE_SOURCE__"
|
|
32
|
+
],
|
|
33
|
+
"skills": [
|
|
34
|
+
"~/.claude/skills",
|
|
35
|
+
"~/.codex/skills"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"projectId": "replace-me",
|
|
4
|
+
"profileMode": "generic",
|
|
5
|
+
"source": "manual",
|
|
6
|
+
"summary": "Pending. Run /onboard-project after login/model selection to generate the compact project context index.",
|
|
7
|
+
"generatedAt": "not-configured",
|
|
8
|
+
"updatedAt": "not-configured",
|
|
9
|
+
"policy": {
|
|
10
|
+
"enabled": true,
|
|
11
|
+
"path": ".pi/context-index.json",
|
|
12
|
+
"writePolicy": "onboarding-record",
|
|
13
|
+
"requireCitations": true,
|
|
14
|
+
"maxNodes": 120,
|
|
15
|
+
"maxEdges": 240,
|
|
16
|
+
"includeTechStack": true,
|
|
17
|
+
"includeMemoryPointers": true
|
|
18
|
+
},
|
|
19
|
+
"nodes": [],
|
|
20
|
+
"edges": [],
|
|
21
|
+
"citations": [],
|
|
22
|
+
"warnings": [
|
|
23
|
+
"context index pending; run /onboard-project"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Pi local runtime
|
|
2
|
+
piagent-state/
|
|
3
|
+
task-inbox/
|
|
4
|
+
todos/
|
|
5
|
+
sessions/
|
|
6
|
+
session-control/
|
|
7
|
+
cache/
|
|
8
|
+
.pi-subagents/
|
|
9
|
+
progress.md
|
|
10
|
+
benchmarks/
|
|
11
|
+
npm/
|
|
12
|
+
git/
|
|
13
|
+
trust.json
|
|
14
|
+
auth.json
|
|
15
|
+
memory/MEMORY.md
|
|
16
|
+
memory/memory_summary.md
|
|
17
|
+
memory/state.sqlite
|
|
18
|
+
memory/raw_memories.md
|
|
19
|
+
memory/rollout_summaries/
|
|
20
|
+
memory/extensions/ad_hoc/
|
|
21
|
+
memory/local/
|
|
22
|
+
memory/.git/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Project Memory
|
|
2
|
+
|
|
3
|
+
Durable project memory for Pi Agent Platform.
|
|
4
|
+
|
|
5
|
+
Rules:
|
|
6
|
+
|
|
7
|
+
- Store only stable preferences, decisions, project conventions, lessons, and open loops.
|
|
8
|
+
- Do not store secrets, credentials, raw customer data, or large source excerpts.
|
|
9
|
+
- Treat memory as hints; verify against the repository before editing.
|
|
10
|
+
|
|
11
|
+
## Entries
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"projectId": "replace-me",
|
|
4
|
+
"displayName": "Replace Me",
|
|
5
|
+
"mode": "generic",
|
|
6
|
+
"rootMarkers": [
|
|
7
|
+
"AGENTS.md",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
10
|
+
"protectedPaths": [
|
|
11
|
+
".git/**",
|
|
12
|
+
"**/auth.json",
|
|
13
|
+
"**/.env",
|
|
14
|
+
"**/.env.*"
|
|
15
|
+
],
|
|
16
|
+
"requiredContext": [
|
|
17
|
+
"AGENTS.md",
|
|
18
|
+
".pi/project-context.md",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"verifyCommands": {
|
|
22
|
+
"docsOnly": [
|
|
23
|
+
"test -s README.md"
|
|
24
|
+
],
|
|
25
|
+
"source": [
|
|
26
|
+
"echo 'Configure verify command in .pi/piagent-profile.json'"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"mcpCapabilities": [
|
|
30
|
+
"filesystem-readonly",
|
|
31
|
+
"filesystem-write",
|
|
32
|
+
"shell",
|
|
33
|
+
"memory"
|
|
34
|
+
],
|
|
35
|
+
"capabilityPacks": [
|
|
36
|
+
{
|
|
37
|
+
"name": "engineering-base",
|
|
38
|
+
"version": "0.1.0"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"capabilityPolicy": {
|
|
42
|
+
"allowedOwners": [
|
|
43
|
+
"platform-maintainers"
|
|
44
|
+
],
|
|
45
|
+
"allowedLifecycles": [
|
|
46
|
+
"experimental"
|
|
47
|
+
],
|
|
48
|
+
"allowedFilesystemRead": [
|
|
49
|
+
"**/*"
|
|
50
|
+
],
|
|
51
|
+
"allowedFilesystemWrite": [
|
|
52
|
+
"**/*"
|
|
53
|
+
],
|
|
54
|
+
"allowedNetworkDomains": [],
|
|
55
|
+
"allowedExternalActions": []
|
|
56
|
+
},
|
|
57
|
+
"memory": {
|
|
58
|
+
"enabled": true,
|
|
59
|
+
"mode": "manual",
|
|
60
|
+
"scope": "project",
|
|
61
|
+
"summaryFile": ".pi/memory/memory_summary.md",
|
|
62
|
+
"handbookFile": ".pi/memory/MEMORY.md",
|
|
63
|
+
"localDir": ".pi/memory/local",
|
|
64
|
+
"readBeforeTask": true,
|
|
65
|
+
"writePolicy": "explicit-only",
|
|
66
|
+
"maxInjectedChars": 4000,
|
|
67
|
+
"externalPackages": []
|
|
68
|
+
},
|
|
69
|
+
"contextIndex": {
|
|
70
|
+
"enabled": true,
|
|
71
|
+
"path": ".pi/context-index.json",
|
|
72
|
+
"writePolicy": "onboarding-record",
|
|
73
|
+
"requireCitations": true,
|
|
74
|
+
"maxNodes": 120,
|
|
75
|
+
"maxEdges": 240,
|
|
76
|
+
"includeTechStack": true,
|
|
77
|
+
"includeMemoryPointers": true
|
|
78
|
+
},
|
|
79
|
+
"orchestration": {
|
|
80
|
+
"defaultMode": "solo-first",
|
|
81
|
+
"maxConcurrentSubagents": 2,
|
|
82
|
+
"defaultReviewLenses": [
|
|
83
|
+
"correctness",
|
|
84
|
+
"tests",
|
|
85
|
+
"scope"
|
|
86
|
+
],
|
|
87
|
+
"fieldGuide": {
|
|
88
|
+
"enabled": true,
|
|
89
|
+
"path": ".pi/memory/MEMORY.md",
|
|
90
|
+
"maxLines": 80,
|
|
91
|
+
"writePolicy": "explicit-only",
|
|
92
|
+
"readBeforeTask": true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"techStack": {
|
|
96
|
+
"provider": "context7",
|
|
97
|
+
"manifest": ".pi/tech-stack.json",
|
|
98
|
+
"contextDir": ".pi/tech-context",
|
|
99
|
+
"roles": {}
|
|
100
|
+
},
|
|
101
|
+
"runtimePolicy": {
|
|
102
|
+
"execPolicy": "enforce",
|
|
103
|
+
"contextBudget": "enforce",
|
|
104
|
+
"toolRegistry": "advisory",
|
|
105
|
+
"finalGate": "enforce"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Project Context
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
- Generated: not yet
|
|
6
|
+
- Profile: see `.pi/piagent-profile.json`
|
|
7
|
+
- Model/pass: run `/onboard-project` after Pi login and model selection
|
|
8
|
+
- Scope: pending
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
This file is the reusable project context snapshot for Pi Agent Platform.
|
|
13
|
+
|
|
14
|
+
Before the first real implementation task in this project:
|
|
15
|
+
|
|
16
|
+
1. Open Pi in the project.
|
|
17
|
+
2. Run `/login` if needed.
|
|
18
|
+
3. Select the intended provider/model.
|
|
19
|
+
4. Run `/onboard-project`.
|
|
20
|
+
|
|
21
|
+
The selected model should inspect the project read-only, then replace this file with a concise project map, required context, verification matrix, and high-risk areas.
|
|
22
|
+
|
|
23
|
+
## Update triggers
|
|
24
|
+
|
|
25
|
+
Regenerate with `/onboard-project` when:
|
|
26
|
+
|
|
27
|
+
- source layout changes;
|
|
28
|
+
- architecture or domain ownership changes;
|
|
29
|
+
- test/build commands change;
|
|
30
|
+
- auth/data/migration/provider policy changes.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defaultProjectTrust": "ask",
|
|
3
|
+
"defaultThinkingLevel": "xhigh",
|
|
4
|
+
"showCacheMissNotices": true,
|
|
5
|
+
"compaction": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"reserveTokens": 16384,
|
|
8
|
+
"keepRecentTokens": 20000
|
|
9
|
+
},
|
|
10
|
+
"packages": [
|
|
11
|
+
"__PIAGENT_PACKAGE_SOURCE__"
|
|
12
|
+
],
|
|
13
|
+
"skills": [
|
|
14
|
+
".claude/skills",
|
|
15
|
+
".codex/skills"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"taskId": "TASK-0001",
|
|
3
|
+
"summary": "Replace with one-sentence task outcome.",
|
|
4
|
+
"riskLane": "normal",
|
|
5
|
+
"expectedOutput": "Replace with exact artifact or behavior expected.",
|
|
6
|
+
"acceptanceCriteria": [
|
|
7
|
+
"Replace with pass/fail criterion."
|
|
8
|
+
],
|
|
9
|
+
"scope": [
|
|
10
|
+
"replace/with/allowed/path/**"
|
|
11
|
+
],
|
|
12
|
+
"outOfScope": [
|
|
13
|
+
"Replace with explicit non-goal."
|
|
14
|
+
],
|
|
15
|
+
"protectedPaths": [],
|
|
16
|
+
"requiredContext": [],
|
|
17
|
+
"contextManifest": [],
|
|
18
|
+
"memoryCitations": [],
|
|
19
|
+
"mcpCapabilities": [],
|
|
20
|
+
"verifyCommands": [
|
|
21
|
+
"Replace with verify command."
|
|
22
|
+
],
|
|
23
|
+
"workPlan": [
|
|
24
|
+
{
|
|
25
|
+
"id": "plan",
|
|
26
|
+
"title": "Confirm scope, context, acceptance criteria, and verify gate before editing.",
|
|
27
|
+
"role": "parent",
|
|
28
|
+
"mode": "read-only",
|
|
29
|
+
"status": "pending"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "implement",
|
|
33
|
+
"title": "Implement the approved bounded change.",
|
|
34
|
+
"role": "parent",
|
|
35
|
+
"mode": "single-writer",
|
|
36
|
+
"status": "pending",
|
|
37
|
+
"dependsOn": [
|
|
38
|
+
"plan"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "review",
|
|
43
|
+
"title": "Run explicit review lenses against the diff and verify evidence.",
|
|
44
|
+
"role": "piagent-reviewer",
|
|
45
|
+
"mode": "review",
|
|
46
|
+
"status": "pending",
|
|
47
|
+
"dependsOn": [
|
|
48
|
+
"implement"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"reviewLenses": [
|
|
53
|
+
"correctness",
|
|
54
|
+
"tests",
|
|
55
|
+
"scope"
|
|
56
|
+
],
|
|
57
|
+
"orchestration": {
|
|
58
|
+
"mode": "solo-first",
|
|
59
|
+
"subagents": "not-used",
|
|
60
|
+
"reason": "Task starts in solo-first mode; use bounded subagents only for independent scout, planning, or review work.",
|
|
61
|
+
"fieldGuidePath": ".pi/memory/MEMORY.md",
|
|
62
|
+
"modelRoles": {
|
|
63
|
+
"planner": "Use the strongest available model for decomposition, architecture, risk, and acceptance criteria.",
|
|
64
|
+
"worker": "Use the fastest reliable model for a bounded, already-planned single write set.",
|
|
65
|
+
"reviewer": "Use a model or thinking setting decorrelated from the worker when review quality matters.",
|
|
66
|
+
"watchdog": "Use a strong model only for final risk review, security, release, or high-impact changes."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"changedFiles": [],
|
|
70
|
+
"verifyEvidence": [],
|
|
71
|
+
"trace": {
|
|
72
|
+
"outcome": "pending"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Tech context snapshots
|
|
2
|
+
|
|
3
|
+
This directory stores concise Context7 snapshots for the selected project tech stack.
|
|
4
|
+
|
|
5
|
+
Use `/profile tech setup` to select the profile and role tech stack. After reading current framework/library docs through Context7, record a short summary with `piagent_profile_tech_context_record`.
|
|
6
|
+
|
|
7
|
+
Do not store secrets, tokens, sessions, credentials, or long copied documentation here.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Project Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Operating model
|
|
4
|
+
|
|
5
|
+
This project uses Pi Agent Platform.
|
|
6
|
+
|
|
7
|
+
Before implementation:
|
|
8
|
+
|
|
9
|
+
1. Load `.pi/piagent-profile.json` with `piagent_context`.
|
|
10
|
+
2. If `.pi/project-context.md` still says "Generated: not yet", run `/onboard-project` after login/model selection before the first implementation task.
|
|
11
|
+
3. Check `.pi/context-index.json` with `/context-index` or `piagent_context_index_status` when available; use it only as an advisory navigation map.
|
|
12
|
+
4. Read `.pi/project-context.md` and required context files listed in the profile; use `piagent_context_budget` for large files.
|
|
13
|
+
5. Check project memory with `piagent_memory_status` when relevant; memory is advisory, source files are authoritative.
|
|
14
|
+
6. Start source-changing work with `piagent_task_start`.
|
|
15
|
+
7. Respect protected paths.
|
|
16
|
+
8. Use `piagent_exec_policy_check` before high-impact or complex shell commands.
|
|
17
|
+
9. Use `piagent_tool_policy_check` before non-piagent MCP/app tools.
|
|
18
|
+
10. Use MCP/tools only when declared in profile.
|
|
19
|
+
11. Use `piagent_usage_snapshot` or `/piagent-usage` when the user asks about token/context usage or session follow-up.
|
|
20
|
+
12. Record context/verify/trace with `piagent_context_record`, `piagent_verify_record`, and `piagent_trace_record`. Passing verify evidence must be the exact command from `task.verifyCommands`.
|
|
21
|
+
13. Run `piagent_task_gate_check` before DONE.
|
|
22
|
+
14. For unclear tasks, use `/discuss` first; do not implement while requirements are unresolved.
|
|
23
|
+
15. For external source repos, use `piagent-source-cache` and read targeted files only.
|
|
24
|
+
16. For medium/large tasks, auto-delegate independent read-only scout/planning/review work to `piagent-scout`, `piagent-planner`, `piagent-reviewer`, or `piagent-oracle` when `pi-subagents` is available. Do not require the user to type `/run` for normal task orchestration.
|
|
25
|
+
17. Keep implementation single-writer by default. Use parallel writers only with explicit user approval or safe worktree isolation and disjoint write sets.
|
|
26
|
+
18. If the bundled `pi-subagents` parent skill is available, use it for delegation patterns, review loops, native supervisor coordination, and safety boundaries.
|
|
27
|
+
|
|
28
|
+
## Review
|
|
29
|
+
|
|
30
|
+
Use `REVIEW_GUIDELINES.md` when reviewing code in this project.
|
|
31
|
+
|
|
32
|
+
## Secrets
|
|
33
|
+
|
|
34
|
+
Do not commit OAuth tokens, API keys, `.env`, `auth.json`, session files, `.pi/memory/MEMORY.md`, `.pi/memory/memory_summary.md`, or `.pi/memory/local/`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Project Review Guidelines
|
|
2
|
+
|
|
3
|
+
Use this file as project-local review policy for Pi `/review` or piagent review prompts.
|
|
4
|
+
|
|
5
|
+
## Review priorities
|
|
6
|
+
|
|
7
|
+
1. Correctness and data integrity.
|
|
8
|
+
2. Security and secret handling.
|
|
9
|
+
3. Contract compatibility with upstream/downstream consumers.
|
|
10
|
+
4. Minimal, maintainable diff.
|
|
11
|
+
5. Tests and verification evidence.
|
|
12
|
+
|
|
13
|
+
## Required review output
|
|
14
|
+
|
|
15
|
+
- Findings with severity.
|
|
16
|
+
- File/line references when possible.
|
|
17
|
+
- Missing verification.
|
|
18
|
+
- Risk of regression.
|
|
19
|
+
- Recommendation: approve / request changes / block.
|
|
20
|
+
|
|
21
|
+
## Project-specific additions
|
|
22
|
+
|
|
23
|
+
Add domain rules here after linking the project.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare module "@earendil-works/pi-coding-agent" {
|
|
2
|
+
export type ExtensionAPI = any;
|
|
3
|
+
export type ExtensionContext = any;
|
|
4
|
+
export function isToolCallEventType(toolName: string, event: any): boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare module "@earendil-works/pi-ai" {
|
|
8
|
+
export const StringEnum: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module "typebox" {
|
|
12
|
+
export const Type: any;
|
|
13
|
+
}
|