Skip to content

Proposal: pi hygiene profile (experimental, non-scoring) - #42

Closed
Mnstanchev (Mnstanchev) wants to merge 1 commit into
microsoft:mainfrom
Mnstanchev:pi-hygiene-profile-proposal
Closed

Mnstanchev (Mnstanchev) wants to merge 1 commit into
microsoft:mainfrom
Mnstanchev:pi-hygiene-profile-proposal

Conversation

@Mnstanchev

Copy link
Copy Markdown

Adds docs/PI-HYGIENE.md: a proposed vendor profile for the pi coding agent, modeled on the existing Copilot hygiene profile.

Motivation (from a live scan, 2026-11-29): a production pi setup scored 83/100 with 39 discovery limitations — AGENTS.md + mcp.json are seen, but pi extensions (always-loaded at boot, no hot-reload), skills/*/SKILL.md frontmatter, settings.json packages, and prompts are invisible. The setup's TE001 finding (always-loaded 2,748 tokens, fixed to 1,161) came entirely from the two surfaces CATES does see.

Contents: motivation table with measured tokens, 6 candidate checks (PIE001–PIM001: extension budget, silent catches, skill frontmatter, package pinning, compaction/thinking config, MCP lifecycle), explicit out-of-scope section.

No code, no rules, no score changes — documentation-only proposal, non-scoring, per the Copilot profile precedent.

Live-scan motivation: a production pi setup scored 83/100 with 39 discovery
limitations — pi extensions (always-loaded at boot, no hot-reload), skills
frontmatter, settings packages and prompts are invisible to the current scan.
Proposes 6 candidate checks (PIE/PIS/PIM) modeled on the Copilot hygiene
profile; adds no stable rules, scores or gates.
Mnstanchev (Mnstanchev) added a commit to Mnstanchev/pi-codemode-kit that referenced this pull request Nov 29, 2026
…nce (2026-11-29)

- bin/cost-per-task.js: CATES semantics — cost per ACCEPTED task, unknown is
  null (never zero); joins outcomes.json; iFood $0.04/run benchmark line
- bin/cates-economics.js: emits TOKEN-ECONOMICS schemaVersion-1 request
  records from the usage ledger (149.6k records; unclassified fields stay
  unclassified, never guessed)
- docs/cates-ledger-mapping.md: field-by-field mapping + honesty rules
- bin/cates-check.sh: weekly config-hygiene gate (self-cloning microsoft/cates
  analyzer); live score 83/100 (was 77 pre-fixes), gate at 78/80
- bin/tool-prune-report.js: automated TokenEconomizer-style tool pruning —
  6 zero-call servers found, only 'magic' enabled-but-unused
- docs/runtime-evidence.json: 4 checks (permission-deny/allow,
  effective-configuration, task-acceptance) from live guard acceptance tests;
  VALIDATED by the analyzer (4/4 pass) after shape fixes (version field, no
  null outcomes, no extra keys)
- bin/session-audit.js + SKILL.md: per-day session audit with classified
  rejections and the visible exemptions block (guard-exceptions.yml registry)
- bin/wait-for-job.js: sanctioned no-sleep-poll pattern as ONE call (live
  tested); bin/research-fact.js: grounded web claims via oss-web + ctx_index
  (live tested)
- bin/reapply-patches.sh: re-applies the context-mode timeoutMs doc patch
  after upgrades (idempotent, tested)
- docs/cates-pi-profile-proposal.md: draft for the upstream pi profile;
  SUBMITTED as microsoft/cates#42
- plan-v2.md: closed decisions (thinking-level keep-high with 7d data;
  reindex automation declined — local merges never fire GitHub events;
  release-hygiene standard adopted at first release)
@msfttoler
Todd Toler (msfttoler) requested a balanced review from Copilot December 1, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documentation conflates extension startup footprint with model-token costs, misstates extension reload support, and omits always-loaded skill metadata from its token-cost inventory.

3 open issues
What changed in this PR

Adds a documentation-only proposal for an optional pi coding-agent hygiene profile, following the existing Copilot profile precedent. It leaves CATES rules, scoring, and gates unchanged.

Changes:

  • Records scan observations and discovery gaps across pi configuration surfaces.
  • Proposes six experimental, non-scoring checks covering extensions, skills, settings, and MCP lifecycle.
  • Defines scope limits, excluding runtime enforcement and runtime-assurance claims.
File Description
docs/​PI-HYGIENE.md Introduces the proposed pi hygiene profile, candidate checks, discovery gaps, and scope boundaries.

Review effort: Balanced

Comment thread docs/PI-HYGIENE.md
Comment on lines +14 to +23
configuration surfaces. The largest always-loaded cost in a pi setup is not
instructions — it is **extensions, which load at process boot and are
invisible to the current scan**.

Measured on the scanned setup (2026-11-29, openai-cl100k):

| Surface | Scope | Tokens today |
|---|---|---|
| `AGENTS.md` | always-loaded | 1,161 (after remediation; was 2,748, TE001) |
| extensions `*.ts` | **always-loaded at boot** | not assessed |
Comment thread docs/PI-HYGIENE.md
|---|---|---|
| `AGENTS.md` | always-loaded | 1,161 (after remediation; was 2,748, TE001) |
| extensions `*.ts` | **always-loaded at boot** | not assessed |
| `skills/*/SKILL.md` | on-demand | not assessed |
Comment thread docs/PI-HYGIENE.md

| ID | Check | Rationale |
|---|---|---|
| `PIE001` | always-loaded extension count and size budget | every extension is paid at every session boot; no hot-reload |
@msfttoler

Copy link
Copy Markdown
Collaborator

Thanks Mnstanchev (@Mnstanchev) for reporting these discovery gaps and proposing broader ecosystem coverage. We are carrying this forward as a proposal in #43 rather than merging a profile document before its scope and loading/token semantics are established. The issue preserves the original context and candidate ideas, records the technical corrections, and requests a minimal reproducible configuration so we can distinguish shared discovery improvements from Pi-specific checks. Closing this PR in favor of that discussion; this is not a rejection of Pi support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants