Skip to content

Rename starter placeholder to Piper - #60

Merged
lchoquel merged 15 commits into
devfrom
feature/Parity-to-JS
Jul 7, 2026
Merged

lchoquel merged 15 commits into
devfrom
feature/Parity-to-JS

Conversation

@lchoquel

@lchoquel lchoquel commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • rename the template placeholder project, package, and CLI from my-project/my_project to piper
  • rework bootstrap replacement logic for the single-token placeholder and keep the renamed CLI/package forms correct
  • overhaul the README quick start, expected outputs, demo docs, and Mermaid diagrams
  • update Unreleased changelog notes for the rename and docs changes

Verification

  • make agent-check
  • make agent-test
  • make v
  • make tb
  • uv run piper extract-entities "Lina from Datum Labs met Omar on July 7, 2026."

Release cut is left for a later batch.

Review in cubic

lchoquel and others added 8 commits July 7, 2026 01:01
…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`.
…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.
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
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
@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR renames the starter placeholder to piper and updates the demo experience. The main changes are:

  • Renamed the project metadata, package, CLI command, imports, tests, and lock metadata to piper.
  • Reworked the bootstrap script for the single-token piper / Piper placeholder.
  • Expanded the README with quick start output, demo commands, and execution-mode diagrams.
  • Added PDF summarization and image-generation demo paths with matching examples, method bundles, and tests.

Confidence Score: 5/5

Safe to merge with minimal risk.

The changes are a coordinated rename plus demo and documentation updates. Bootstrap tests cover the prior survivor-check issue and the renamed CLI paths are covered by unit tests.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • I reviewed the real Piper extract-entities CLI transcript and noted an API credential blocker (401 Unauthorized) that blocked access, as shown in the verified log.
  • Targeted Piper extract-entities CLI tests were executed and all targeted tests passed (17 passed, 2 deselected).
  • The extract-entities lint checks (.mthds) passed, confirming static checks are green.
  • An agent-test run was attempted but failed due to a missing bootstrap script, blocking progress on agent validation.
  • The make v validation completed successfully, confirming the validation step passes.

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 replacement around piper / Piper, targeted pyproject.toml edits, package directory rename, and a neutral survivor check.
README.md Overhauls quick start and demo documentation around the piper CLI, file-input PDF summary, image generation, and execution-mode diagrams.
piper/cli.py Renames CLI imports and messages to piper and wires the extract, summarize-PDF, generate-image, and run-inspection commands.
piper/runner.py Renames durable and blocking execution guidance and resume hints to the piper CLI.
piper/file_input.py Adds document file input encoding to build a base64 data: URL Document envelope for the API.
piper/examples/summarize_pdf.py Adds the PDF summarization example with typed DocumentSummary output parsing.
piper/examples/generate_image.py Adds the image generation example with typed parsing for built-in Image output.
piper/methods/summarize-pdf/main.mthds Adds the PDF summarization method bundle with Document input and structured summary output.
pyproject.toml Renames project metadata, console script, package discovery, type-checker targets, and lock metadata to piper.
tests/unit/test_bootstrap_script.py Adds tests for survivor-check handling of requested names containing piper and unhandled placeholder tokens.
tests/unit/test_cli.py Updates CLI tests for piper commands and adds coverage for PDF document inputs and image prompts.
uv.lock Regenerates lock metadata for the renamed piper project package.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User as User / CLI
participant Piper as piper Typer app
participant Runner as piper.runner
participant API as Hosted Pipelex API
participant Parser as piper.examples parser

User->>Piper: "uv run piper <demo> inputs"
Piper->>Piper: read .mthds bundle and build inputs
alt blocking mode
    Piper->>Runner: run_blocking(pipe_code, bundle, inputs)
    Runner->>API: execute(mthds_contents, inputs)
    API-->>Runner: resolved main_stuff
else durable attended/default
    Piper->>Runner: run_durable_attended(pipe_code, bundle, inputs)
    Runner->>API: start(mthds_contents, inputs)
    API-->>Runner: run id
    Runner->>API: wait_for_result(run id)
    API-->>Runner: resolved main_stuff
else durable detached
    Piper->>Runner: start_detached(pipe_code, bundle, inputs)
    Runner->>API: start(mthds_contents, inputs)
    API-->>Runner: run id
    Runner-->>User: print run id for later piper runs wait
end
Runner-->>Piper: RunResults
Piper->>Parser: parse(results.main_stuff)
Parser-->>User: JSON output
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 / CLI
participant Piper as piper Typer app
participant Runner as piper.runner
participant API as Hosted Pipelex API
participant Parser as piper.examples parser

User->>Piper: "uv run piper <demo> inputs"
Piper->>Piper: read .mthds bundle and build inputs
alt blocking mode
    Piper->>Runner: run_blocking(pipe_code, bundle, inputs)
    Runner->>API: execute(mthds_contents, inputs)
    API-->>Runner: resolved main_stuff
else durable attended/default
    Piper->>Runner: run_durable_attended(pipe_code, bundle, inputs)
    Runner->>API: start(mthds_contents, inputs)
    API-->>Runner: run id
    Runner->>API: wait_for_result(run id)
    API-->>Runner: resolved main_stuff
else durable detached
    Piper->>Runner: start_detached(pipe_code, bundle, inputs)
    Runner->>API: start(mthds_contents, inputs)
    API-->>Runner: run id
    Runner-->>User: print run id for later piper runs wait
end
Runner-->>Piper: RunResults
Piper->>Parser: parse(results.main_stuff)
Parser-->>User: JSON output
Loading

Reviews (3): Last reviewed commit: "Refactor placeholder survivor check with..." | Re-trigger Greptile

@lchoquel
lchoquel changed the base branch from main to dev July 7, 2026 10:37
Comment thread .claude/skills/bootstrap/scripts/bootstrap.py
@lchoquel
lchoquel merged commit b1a0510 into dev Jul 7, 2026
12 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2026
@lchoquel
lchoquel deleted the feature/Parity-to-JS branch July 7, 2026 12:27
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