Skip to content

Release/v0.13.0 - #61

Merged
lchoquel merged 2 commits into
mainfrom
release/v0.13.0
Jul 7, 2026
Merged

lchoquel merged 2 commits into
mainfrom
release/v0.13.0

Conversation

@lchoquel

@lchoquel lchoquel commented Jul 7, 2026

Copy link
Copy Markdown
Member

[v0.13.0] - 2026-07-07

  • Breaking: renamed the starter's placeholder project from my-project / my_project / My Project to piper / Piper. The console command is now uv run piper ..., the template package is piper/, pyproject.toml points at piper.cli:app, and the e2e extract-entities test file no longer carries the project placeholder in its name.
  • Reworked /bootstrap for the single-token placeholder. It now derives distribution, package, and title forms from piper, applies context-aware replacements for command vs import/path positions, edits pyproject.toml by key, and aborts before writing if any placeholder tokens survive.
  • Overhauled the README DevX. The quick start now explains uv run before the first command, shows real expected output, groups the demos around copy-pasteable commands, explains durable vs blocking execution, and adds Mermaid diagrams for hosted-run flow and execution modes.
  • Added demo methods so the starter matches the JS starter. summarize-pdf summarizes a document (PDF) into { title, doc_type, key_points } and demonstrates a file input: piper/file_input.build_document_input() encodes a local file as a base64 data: URL wrapped in a Document envelope. generate-image generates an image from a text prompt and is the slow case that overruns the hosted ~30s blocking cap, making the durable-vs-blocking split concrete. Each is a self-contained "copy me" module under piper/examples/ with a matching main.mthds bundle and its own unit + e2e tests. Ships samples/sample-invoice.pdf to try summarize-pdf on.

Review in cubic

lchoquel and others added 2 commits July 7, 2026 14:26
* Complete the set pf examples

* feat: rename project from `my-project` to `piper` and update related files

- Created `TODOS.md` with implementation plan for renaming and README improvements.
- Added `__init__.py` to `piper` package.
- Implemented `cli.py` for the `piper` CLI, including commands for extracting entities, summarizing PDFs, and generating images.
- Added error handling in `errors.py` for SDK errors.
- Created example modules for `extract_entities`, `generate_image`, and `summarize_pdf`.
- Implemented file input handling in `file_input.py`.
- Added method definitions in `methods` directory for each example.
- Updated `runner.py` to handle execution modes for the CLI.
- Created end-to-end tests for `extract_entities`.

* Rename project from "My Project" to "Piper" throughout the codebase, including README, CLI commands, and package structure. Update all relevant imports and references in the code and tests. Adjust project metadata in pyproject.toml and regenerate lock file. Ensure all instances of the old project name are replaced with the new name, maintaining functionality and consistency across the application.

* docs(todos): record Phase 1–2 completion + refresh for cold start

Phases 1 (piper rename sweep) and 2 (bootstrap rework) are committed
(97a28b2 + 6d5adbf). Reconcile TODOS.md so a fresh session resumes at
Phase 3 without being misled by the original future-tense framing:

- add a "START HERE" banner (status, commits, still-open questions,
  the uncommitted cross-repo doc loose end)
- update "Current git state" + CHECKPOINT 1 STATUS (committed, tree
  clean, 3 ahead of main) — was "Nothing committed / mixed staging"
- mark the discovered drift RESOLVED and Q2 (branch strategy) resolved
- refresh the Key files map to post-rename reality (setuptools not
  hatch; three name forms; test_extract_entities.py; README is the
  Phase 3 target with the bootstrap anchor coupling called out)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVcEMuFTCU6iAmi3PP3hho

* docs(readme): DevX pass + Mermaid diagrams

Rework the starter README so a newcomer sees a real product, not a template:

- Frame `uv run` as Python's `npx` before the first command; keep the
  activate-venv note as the fallback.
- Show real, captured expected-output JSON in Quick start and in a new
  "Try the demos" section (one block per demo: command, output, teaching point).
- Lead "Use this template" with the /bootstrap skill; manual steps as the
  fallback (now naming [project.scripts] + [tool.setuptools] packages, which
  the old list missed).
- Add Mermaid diagrams: a flowchart of how a run works (bundle sent as
  content, not code), and a sequence diagram of the durable-vs-blocking
  execution modes (the ~30s cap shown as a lost-message cross). Validated
  with mmdc.

The bootstrap strip/rename anchors (### Use this template, the *Replace "…
line, [MIT license](LICENSE)) are preserved; verified the reworded README
still strips + renames cleanly with zero surviving placeholder tokens.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVcEMuFTCU6iAmi3PP3hho

* docs(todos): record Phase 3-4 completion

* docs(changelog): describe piper template rename

* docs(todos): record Phase 5 completion

* docs(readme): improve flowchart readability

* docs(readme): split execution mode diagram

* docs(readme): title execution mode comparisons

* docs(readme): retitle blocking timeout diagram

* docs(readme): separate execution mode examples

* Refactor placeholder survivor check with neutral probe

* Remove completed TODO plan

---------

Co-authored-by: Louis Choquel <8851983+lchoquel@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UH7r6D5TgSAxh68uULedZX
@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the starter for the piper release and adds new demo flows. The main changes are:

  • Renames the starter placeholder, package, CLI command, metadata, docs, and tests to piper.
  • Adds summarize-pdf and generate-image demos with matching .mthds bundles and CLI commands.
  • Adds file-input encoding for Pipelex Document inputs and a sample invoice PDF.
  • Reworks the bootstrap script for context-aware single-token replacement and survivor checks.
  • Expands unit, integration, and e2e coverage for the renamed package and new demos.

Confidence Score: 5/5

Safe to merge with low functional risk.

Broad but mostly mechanical rename plus scoped demo additions. New CLI paths, file-input helper, parser wrappers, method bundle references, and bootstrap behavior have targeted coverage. No verified bugs were found in the changed paths.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • The Piper CLI demo 02 after log was reviewed to confirm the CLI help commands return exit code 0 and list the expected commands and options.
  • The Piper unit demo 02 after log was analyzed to verify the narrow unit test suite ran and passed, showing 25 tests passed in 0.27s with exit code 0.
  • The Piper e2e credential probe 02 after log was examined to confirm credential handling, showing the API key redacted and recording the credential blocker.
  • The Piper demo validation 02 after log was reviewed to confirm the end-to-end transcript of the generated validation script, which combines CLI smoke, unit tests, and credential-aware e2e skip and exits 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
.claude/skills/bootstrap/scripts/bootstrap.py Reworks placeholder transformation around piper and Piper, with context-aware replacements and survivor checks.
piper/cli.py Renames CLI imports and references to piper and adds summarize-pdf and generate-image commands.
piper/file_input.py Adds helper logic to encode local files as Pipelex Document data-URL envelopes.
piper/examples/summarize_pdf.py Adds a typed PDF-summary example wrapper for the summarize-pdf method bundle.
piper/examples/generate_image.py Adds a typed image-generation example wrapper for the generate-image method bundle.
piper/methods/summarize-pdf/main.mthds Adds the PDF-summary .mthds bundle with a structured DocumentSummary output.
piper/methods/generate-image/main.mthds Adds the image-generation .mthds bundle using a text prompt and Image output.
pyproject.toml Updates package metadata, scripts, package discovery, and test markers for the piper starter and new demos.
tests/unit/test_cli.py Extends CLI unit coverage for renamed commands, file inputs, and image/PDF demos.
tests/integration/test_fundamentals.py Extends bundle existence and API validation checks across all demo bundles.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User as User
participant CLI as piper CLI
participant Helper as Example/File helpers
participant Runner as piper.runner
participant API as Pipelex API

User->>CLI: piper extract-entities / summarize-pdf / generate-image
CLI->>Helper: read bundle, parse text or build Document input
Helper-->>CLI: pipe_code, mthds_contents, inputs
CLI->>Runner: dispatch(mode, detach, inputs)
alt blocking
    Runner->>API: execute(pipe_code, mthds_contents, inputs)
    API-->>Runner: RunResults-compatible output
else durable attended
    Runner->>API: start(pipe_code, mthds_contents, inputs)
    API-->>Runner: run id
    Runner->>API: wait_for_result(run id)
    API-->>Runner: RunResults
else durable detached
    Runner->>API: start(pipe_code, mthds_contents, inputs)
    API-->>Runner: run id
end
Runner-->>CLI: RunResults or run id
CLI->>Helper: parse(results.main_stuff)
CLI-->>User: JSON result
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User as User
participant CLI as piper CLI
participant Helper as Example/File helpers
participant Runner as piper.runner
participant API as Pipelex API

User->>CLI: piper extract-entities / summarize-pdf / generate-image
CLI->>Helper: read bundle, parse text or build Document input
Helper-->>CLI: pipe_code, mthds_contents, inputs
CLI->>Runner: dispatch(mode, detach, inputs)
alt blocking
    Runner->>API: execute(pipe_code, mthds_contents, inputs)
    API-->>Runner: RunResults-compatible output
else durable attended
    Runner->>API: start(pipe_code, mthds_contents, inputs)
    API-->>Runner: run id
    Runner->>API: wait_for_result(run id)
    API-->>Runner: RunResults
else durable detached
    Runner->>API: start(pipe_code, mthds_contents, inputs)
    API-->>Runner: run id
end
Runner-->>CLI: RunResults or run id
CLI->>Helper: parse(results.main_stuff)
CLI-->>User: JSON result
Loading

Reviews (1): Last reviewed commit: "Release v0.13.0: rename starter placehol..." | Re-trigger Greptile

@lchoquel
lchoquel merged commit 65f8521 into main Jul 7, 2026
18 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
@lchoquel
lchoquel deleted the release/v0.13.0 branch July 7, 2026 13:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant