Skip to content

Propagate the Pi (.pi/) adapter tier in the AI corpus broadcast - #66

Merged
woksin merged 1 commit into
mainfrom
feature/propagate-pi-adapters
Aug 18, 2026
Merged

Propagate the Pi (.pi/) adapter tier in the AI corpus broadcast#66
woksin merged 1 commit into
mainfrom
feature/propagate-pi-adapters

Conversation

@woksin

@woksin woksin commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What

Teach the copilot-instructions broadcast propagation about the new Pi (Pi coding agent) adapter tier that the AI corpus now carries under .pi/.

Without this, .pi/** is never selected for propagation, so every other Cratis repo would silently miss the Pi tier.

Changes (prepare-copilot-source-artifact.sh)

  1. Selection — add .pi/ to the source-tree file filter (previously .pi/** was ignored entirely).

  2. Adapter normalization — add two per-file symlink cases, mirroring the existing .claude/commands/*.md and .github/agents/*.agent.md cases:

    • .pi/prompts/<n>.md../../.ai/prompts/<n>.prompt.md
    • .pi/agents/<n>.md../../.ai/agents/<n>.md

    Each only normalizes when the matching canonical .ai/ file exists, so a repo that has copied content at an adapter path is repaired back to a symlink.

  3. .pi/extensions/** carry no adapter spec and fall through as real content — the same treatment as .claude/settings.json (they are adapter machinery, not symlink adapters).

Verification

  • bash -n + shellcheck -S error clean.
  • Selection regex unit-tested: picks .pi/prompts, .pi/agents, .pi/extensions, excludes Source/.
  • Case logic unit-tested: prompts/agents → 120000 symlink targets; .pi/extensions/* → no spec (content).

Paired with the .pi/ tier and the .github/workflows/propagate-copilot-instructions.yml trigger addition in Cratis/AI.

The AI corpus now carries a Pi (Pi coding agent) adapter tier under .pi/:
per-file prompt symlinks (.pi/prompts/<n>.md -> ../../.ai/prompts/<n>.prompt.md),
per-file agent symlinks (.pi/agents/<n>.md -> ../../.ai/agents/<n>.md), and real
extension machinery under .pi/extensions/ (the subagent tool + the cratis-hooks
bridge, the Pi peer of the .claude/settings.json hook wiring).

Teach the source-artifact preparer about it so broadcast propagation keeps the
Pi tier intact across Cratis repositories:
- select .pi/ paths (they were previously ignored entirely);
- normalize the two per-file symlink adapters back to symlinks when the matching
  canonical .ai/ file exists (mirrors the .claude/commands and .github/agents
  cases), so a repo holding copied content at those paths is repaired;
- .pi/extensions/** carry no adapter spec and fall through as real content,
  the same treatment as .claude/settings.json.
@woksin
woksin merged commit 81ce301 into main Aug 18, 2026
@woksin
woksin deleted the feature/propagate-pi-adapters branch August 18, 2026 22:24
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.

1 participant