add pi#129
Merged
Merged
Conversation
davidabram
force-pushed
the
pi
branch
6 times, most recently
from
July 14, 2026 11:06
e55d2a9 to
00d274e
Compare
Pi consumes project-local prompts (.pi/prompts) and Agent Skills
(.pi/skills) but has no native sub-agent format, so SCE agents are
rendered as agent-role prompt templates (agent-{slug}.md) with an
act-as-role preamble and $ARGUMENTS input.
Adds pi-content.pkl and pi-metadata.pkl mirroring the Claude renderer
pair, wires them into generate.pkl, extends check-generated.sh path
coverage, and enforces Pi metadata keys in metadata-coverage-check.pkl.
Co-authored-by: SCE <sce@crocoder.dev>
Extend prepare-cli-generated-assets.sh and the Nix build asset staging to copy config/.pi into cli/assets/generated/config/pi, and add a PI_EMBEDDED_ASSETS target in build.rs (emitted with allow(dead_code) until setup --pi consumes it). The re-sync also picks up the previously unsynced integrations block in the sce-config schema mirror. Co-authored-by: SCE <sce@crocoder.dev>
Teach the config layer about the pi target so .sce/config.json can persist and validate it. Adds the Pi variant to IntegrationTargetId with parse/round-trip support and unit tests, extends the integrations.target enum in the Pkl schema (JSON schemas regenerated and the embedded CLI mirror re-synced), and adds a compile-only no-op doctor match arm until full Pi doctor coverage lands in a later task. Co-authored-by: SCE <sce@crocoder.dev>
`sce setup` now installs the embedded Pi asset tree into .pi/ via --pi and expands --all to opencode+claude+pi, replacing the removed --both flag (now rejected as an unknown option). The interactive prompt offers OpenCode, Claude, Pi, and All, and installed targets persist into .sce/config.json integrations.target as before. EmbeddedAssetSelectionIter is generalized from a two-variant enum to a slice-chaining iterator so any concrete-target expansion works, and PI_EMBEDDED_ASSETS drops its dead_code allowance now that it is consumed. Co-authored-by: SCE <sce@crocoder.dev>
Add Pi target resolution, prompt/skill integration grouping, and problem-kind plumbing so `sce doctor` validates installed `.pi` assets for missing or mismatched embedded content. Co-authored-by: SCE <sce@crocoder.dev>
Update README, Pkl generation docs, and architecture context to describe Pi as a first-class generated config target with setup flags and generated output ownership. Co-authored-by: SCE <sce@crocoder.dev>
Materialize the .pi/ prompts and skills produced by the Pi asset sync so the repo carries the same SCE workflows (plan authoring, task execution, validation, commit, handover) for the Pi harness that already exist for Claude and opencode. Add "pi" to the integration targets in .sce/config.json so setup/doctor treat it as active.
Pi previously had no runtime hook into SCE bash-tool policy. Add a project-local Pi extension (config/lib/pi-plugin/sce-pi-extension.ts, emitted verbatim by config/pkl/generate.pkl to config/.pi/extensions/sce/index.ts) whose tool_call handler delegates bash-command evaluation to `sce policy bash --input normalized --output json` and blocks denied commands with the policy ID and reason. All failure paths (missing CLI, timeout, non-zero exit, invalid JSON) fail open. Adds the type-only @earendil-works/pi-coding-agent dependency, extends config/pkl/check-generated.sh drift coverage to config/.pi/extensions, and includes the plan and context updates for this slice. Co-authored-by: SCE <sce@crocoder.dev>
Capture completed Pi user and assistant messages on message_end, extract text and reasoning parts, and send mixed message/message.part batches to sce hooks conversation-trace with fail-open fire-and-forget behavior. Co-authored-by: SCE <sce@crocoder.dev>
Record unified diffs for Pi edit/write tool calls: a tool_call handler captures pending mutations (target path, prior contents) keyed by toolCallId, and the tool_result handler produces a diff via git diff --no-index on temp files, rewriting header labels to the repo-relative path. Each diff is emitted fire-and-forget as a synthetic patch conversation part and a normalized diff-trace payload with tool_name "pi", nullable model_id/tool_version. Failed edits and no-op writes produce no rows; missing sce binary fails open. Co-authored-by: SCE <sce@crocoder.dev>
Pi diff-trace payloads previously stored raw session IDs, making Pi provenance indistinguishable from unprefixed sources. Add PI_TOOL_NAME and DIFF_TRACE_PI_SESSION_ID_PREFIX with a "pi" match arm in prefixed_diff_trace_session_id(), keeping oc_/cc_ behavior and unknown-tool passthrough unchanged. Tests cover fresh prefixing, idempotency, normalized payload persistence, and post-commit intersection provenance. Co-authored-by: SCE <sce@crocoder.dev>
davidabram
force-pushed
the
pi
branch
3 times, most recently
from
July 15, 2026 14:00
dede184 to
7b068b0
Compare
The Pi SCE extension existed only as a project-local source file and was not shipped through the asset pipeline, so `sce setup --pi` could not install it and `sce doctor` had no visibility into its health. Sync `config/.pi/extensions/sce/index.ts` into the generated CLI assets (embedded wholesale via the existing whole-tree copy), and bucket embedded `extensions/**` Pi assets into a new `Pi extensions` doctor integration group so missing or drifted extension files are flagged through the existing Pi integration problem kinds. Co-authored-by: SCE <sce@crocoder.dev>
Implement the Pi extension entrypoint with bash policy enforcement, conversation trace capture, and edit/write diff trace forwarding through the SCE CLI hooks. Co-authored-by: SCE <sce@crocoder.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.