feat(init): friendlier onboarding — quickstart instead of a dead-end error - #57
Conversation
…error `prodcycle init` with nothing to auto-configure printed a dense one-paragraph message and exited 2 (an error) — hostile for a first run. It now prints a scannable, copy-pasteable quickstart (coding agents / CI / API key / scan) and exits 0. - `--help` gains a "Quick start" examples block (commander addHelpText / argparse epilog). - The missing-API-key error now points to where to get a key. - Node + Python kept in lockstep — `init` output is byte-identical (new parity test spawns both and diffs); +1 node / +1 python test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR improves first-run UX by replacing
Confidence Score: 5/5Safe to merge — changes are limited to CLI output text, exit codes, and test files; no production logic is altered. All modified paths are user-facing message strings, exit-code adjustments, and new tests. The byte-identical invariant is enforced by the new parity test, and both runtimes received symmetric updates. The only rough edge is a missing timeout in the Python unit test, which is a test-reliability nit rather than anything that could regress the application. python/tests/test_init_quickstart.py — subprocess.run has no timeout; add timeout=10 to match the Node parity test. Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
python/tests/test_init_quickstart.py:24-26
The `subprocess.run` call has no `timeout` argument. If the spawned Python process deadlocks or blocks on I/O, this test (and the CI job running it) will hang indefinitely. The companion Node parity test already guards against this with `timeout: 10_000` — the same protection should apply here. `subprocess.run` raises `subprocess.TimeoutExpired` on timeout, which the test runner will surface as a failure rather than a hang.
```suggestion
result = subprocess.run(
[sys.executable, '-c', code], capture_output=True, text=True,
timeout=10,
)
```
Reviews (2): Last reviewed commit: "test(init): add spawnSync timeout + surf..." | Re-trigger Greptile |
Greptile P2s on init-quickstart-parity.test.mjs: - Add timeout: 10_000 to both spawnSync calls so a hung child fails the test instead of stalling the runner indefinitely. - Assertion messages now prefer result.error?.message — on a spawn failure (missing binary, timeout) status is null and stderr is empty, so error is the only actionable signal. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump node + python to 0.6.16 and promote the [Unreleased] onboarding entry to [0.6.16]. Ships #57: `prodcycle init` quickstart (exit 0, not a dense exit-2 error), `--help` quick-start examples, and a clearer missing-API-key message. Publishing: cut a GitHub Release v0.6.16 to trigger publish.yml (npm + PyPI, gated on the test matrix). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Problem (reported)
prodcycle initwith nothing to auto-configure printed a dense, hard-to-read paragraph and exited with code 2 (an error) — a hostile first-run experience:After
initnow prints a scannable, copy-pasteable quickstart and exits 0 (discovering the options isn't an error):Plus two smaller onboarding wins from the audit:
--helpgains a "Quick start" examples block (commanderaddHelpText/ argparseepilog).Parity & tests
Node + Python
initoutput is byte-identical (verified by a new parity test that spawns both and diffs). +1 node / +1 python test; full suites green (121 node / 109 python). No version bump — release when ready.🤖 Generated with Claude Code