Skip to content

[output] Roll out structured output across commands and workflows (#33)#146

Merged
coisa merged 68 commits intomainfrom
feat/33-structured-output
Apr 21, 2026
Merged

[output] Roll out structured output across commands and workflows (#33)#146
coisa merged 68 commits intomainfrom
feat/33-structured-output

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 21, 2026

Related Issue

Closes #33

Motivation / Context

  • provide a repository-wide structured-output strategy for DevTools instead of a changelog-only rollout
  • keep the interactive human-readable CLI experience intact while giving CI, bots, and AI-agent workflows deterministic machine-readable output
  • make nested command orchestration and GitHub Actions logs easier to inspect without pushing output-formatting concerns down into every command

Changes

  • standardize --json and --pretty-json across the DevTools command surface, including pretty-printed terminal JSON and agent-aware JSON defaults when the runtime is detected as agent-driven
  • centralize command-context extraction through logger processors so commands pass input / output and the logger expands command, arguments, options, and buffered command output consistently
  • move GitHub Actions error annotations into the logger so logged failures automatically emit workflow annotations, including file / line metadata when commands provide it
  • introduce GithubActionOutput and use it from ProcessQueue to group queued subprocess output into collapsible workflow sections with cleaner labels in CI
  • migrate orchestration-heavy commands such as standards and reports to the shared queue flow so nested command execution, buffering, and workflow presentation are handled consistently
  • propagate structured-output flags through nested DevTools subprocesses and prefer quieter subprocess modes when machine-readable output is active
  • replace the negative --no-progress flag with positive --progress, keeping supported commands quiet by default while still allowing explicit progress in text-mode runs
  • normalize result logging through shared command traits and improve GitHub Actions visibility without changing command exit semantics
  • expand PHPUnit coverage for logger behavior, queue behavior, command orchestration, and CI-specific GitHub Actions output expectations
  • refresh README, command guides, running guides, troubleshooting notes, and changelog coverage for the final behavior shipped by this branch

Verification

  • COMPOSER_NO_INTERACTION=1 composer dev-tools:fix
  • Focused command(s):
    • composer dev-tools tests -- --filter='(ProcessQueueTest|ReportsCommandTest|StandardsCommandTest|TestsCommandTest|RefactorCommandTest|CodeStyleCommandTest|PhpDocCommandTest|DocsCommandTest|MetricsCommandTest)'
    • composer dev-tools tests -- --filter='(GithubActionOutputTest|ProcessQueueTest|OutputFormatLoggerTest|ReportsCommandTest|StandardsCommandTest)'
  • Manual verification:
    • confirmed GitHub Actions workflow commands are emitted only when supported
    • confirmed queued subprocess labels are human-readable in workflow groups
    • confirmed structured output remains deterministic while nested tools stay quiet unless --progress is requested in text mode

Documentation / Generated Output

  • README updated
  • docs/ updated
  • Generated or synchronized output reviewed

Changelog

  • Added a notable CHANGELOG.md entry

Reviewer Notes

  • this PR now covers the full structured-output foundation for DevTools commands, including logger integration, nested subprocess propagation, workflow annotations/groups, and the progress-control contract
  • the branch also stabilizes CI expectations so GitHub Actions-specific output stays deterministic in the PHPUnit suite

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 21, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

@coisa coisa changed the title [output] Add initial structured changelog check output (#33) [output] Roll out structured output across commands and workflows (#33) Apr 21, 2026
@coisa coisa marked this pull request as ready for review April 21, 2026 22:54
@coisa coisa merged commit 1988b19 into main Apr 21, 2026
24 checks passed
@coisa coisa deleted the feat/33-structured-output branch April 21, 2026 23:25
github-actions Bot added a commit that referenced this pull request Apr 21, 2026
@coisa coisa moved this from Released to Merged in PHP Fast Forward Project Apr 22, 2026
@coisa coisa moved this from Merged to Released in PHP Fast Forward Project Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Add structured output support for AI agents and automation workflows

1 participant