[object Object]

← back to Cli Printing Press

fix(skills): require CLI description rewrite after generation (#64)

bafe35635ab184dcd3b04bdc66b88119c0975feb · 2026-03-29 21:00:55 -0700 · Trevin Chow

The generator copies the spec description as the CLI's help text, but
spec descriptions describe the API ("Undocumented internal API...") not
the CLI ("Search and browse the Postman API Network"). Add a required
post-generation step to rewrite the Short field using the product thesis.

Also adds --spec-source sniffed to sniff generate commands so generated
CLIs get adaptive rate limiting by default.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit bafe35635ab184dcd3b04bdc66b88119c0975feb
Author: Trevin Chow <trevin@trevinchow.com>
Date:   Sun Mar 29 21:00:55 2026 -0700

    fix(skills): require CLI description rewrite after generation (#64)
    
    The generator copies the spec description as the CLI's help text, but
    spec descriptions describe the API ("Undocumented internal API...") not
    the CLI ("Search and browse the Postman API Network"). Add a required
    post-generation step to rewrite the Short field using the product thesis.
    
    Also adds --spec-source sniffed to sniff generate commands so generated
    CLIs get adaptive rate limiting by default.
    
    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---
 skills/printing-press/SKILL.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/skills/printing-press/SKILL.md b/skills/printing-press/SKILL.md
index e659f403..d4828ad5 100644
--- a/skills/printing-press/SKILL.md
+++ b/skills/printing-press/SKILL.md
@@ -773,6 +773,7 @@ printing-press generate \
   --spec "$RESEARCH_DIR/<api>-sniff-spec.yaml" \
   --name <api> \
   --output "$PRESS_LIBRARY/<api>-pp-cli" \
+  --spec-source sniffed \
   --force --lenient --validate
 ```
 
@@ -782,6 +783,7 @@ Sniff-only (no original spec, sniff was the primary source):
 printing-press generate \
   --spec "$RESEARCH_DIR/<api>-sniff-spec.yaml" \
   --output "$PRESS_LIBRARY/<api>-pp-cli" \
+  --spec-source sniffed \
   --force --lenient --validate
 ```
 
@@ -800,6 +802,15 @@ GraphQL-only APIs:
 - Build real commands in Phase 3 using a GraphQL client wrapper
 
 After generation:
+
+**REQUIRED: Rewrite the CLI description.** The generator copies the spec's `description` field
+as the CLI's `Short` help text. Spec descriptions describe the *API* ("Payment processing API")
+but CLI help should describe what the *CLI does* ("Manage payments, subscriptions, and invoices
+via the Stripe API"). Open `$PRESS_LIBRARY/<api>-pp-cli/internal/cli/root.go`, find the
+`Short:` field on the root cobra command, and rewrite it as a concise, user-facing description
+of the CLI's purpose. Use the product thesis from the Phase 1 brief to inform the rewrite.
+
+Then:
 - note skipped complex body fields
 - fix only blocking generation failures here
 - do not start broad polish work yet

← e26505e5 feat(cli): add adaptive rate limiting for sniffed APIs (#62)  ·  back to Cli Printing Press  ·  feat(cli): use local module path at generation, rewrite at p 244c4845 →