feat: AI-friendly run output and actionable error diagnostics#10
Open
kevinccbsg wants to merge 9 commits into
Open
feat: AI-friendly run output and actionable error diagnostics#10kevinccbsg wants to merge 9 commits into
kevinccbsg wants to merge 9 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…Duration note Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TWD Contract Validation
23 passed · 41 failed · 3 warnings · 1 skipped Failed validations./contracts/users-3.0.json
./contracts/posts-3.1.json
./contracts/products-3.0.json
./contracts/events-3.1.json
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TWD Contract Validation
23 passed · 41 failed · 3 warnings · 1 skipped Failed validations./contracts/users-3.0.json
./contracts/posts-3.1.json
./contracts/products-3.0.json
./contracts/events-3.1.json
|
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.
Summary
Replaces twd-cli's verbose output with the AI-agent-friendly format used by twd-relay's
runsubcommand, and adds actionable diagnostics for known infrastructure failures. Motivation: AI TDD loops (run → read failures → fix → re-run) need failure details in one place and minimal noise per iteration.Output changes
--- Run complete ---block, always the last output: passed/failed/skipped counts, duration, failed tests with fullsuite > testpaths and error messages together, plus retried testsreportResults), and status chatter — a green run is now ~5 lines instead of 100+Error diagnostics (
src/diagnostics.js)Known failures now print cause + remediation instead of a raw stack trace:
ERR_CONNECTION_REFUSED/ DNS / unreachable) → "Is your dev server running? …"protocolTimeout(existing hint, moved into the module)npx puppeteer browsers install chrome…"Unknown errors print message first, then stack.
bin/twd-cli.jscan no longer exit 1 silently.Dependency cleanup
twd-jsremoved from dependencies (its only import,reportResults, is gone). Lockfile regenerated on macOS and vianpm run lock:linux.Docs
Design spec and implementation plan under
docs/superpowers/; CLAUDE.md updated.Test plan
test-example-app(real Chrome): green run, deliberately-broken test, and stopped dev server — all matched the spec'd output, verified exit codes🤖 Generated with Claude Code