Faultline's core CLI stays provider-agnostic. A GitHub-specific integration should be a thin wrapper over stable CLI commands and output artifacts, not a fork of the product logic.
For most teams, this wrapper is the strongest follow-up path after validating the local CLI flow. It should stay a thin integration layer over the default product path, not redefine it.
The recommended surfaces for a separate faultline-action repository are:
- human summary:
faultline analyze <logfile> --format markdown - machine-readable diagnosis:
faultline analyze <logfile> --json - deterministic next-step handoff:
faultline workflow <logfile> --json --mode agent
These contracts already exist in the CLI and should remain the integration boundary. GitHub annotations, summaries, and check-run presentation should be generated by the wrapper from JSON or markdown artifacts rather than by the core CLI.
workflow.v1 is the deterministic handoff contract for downstream scripts and agents. Additive fields are allowed; silent removals or renames are not.
Current additive workflow JSON may also carry ranking_hints, delta_hints,
metrics_hints, and policy_hints when the underlying analysis has enough
explicit context. Those fields should remain optional and omitted when absent.
- Keep GitHub-specific wiring out of
internal/. - Use file input or stdin capture, not provider-specific parsing inside the CLI.
- Treat the CLI JSON and workflow payloads as the source of truth for artifacts.
- Let GitHub choose presentation, upload, and threshold policy outside the core binary.
- Do not duplicate matching, ranking, or workflow logic in the action repository.
- Capture the failing log into a file inside the workflow job.
- Run
faultline analyzeto produce markdown and JSON artifacts, including ranking metadata. - Run
faultline workflow --json --mode agentto produce the deterministic follow-up artifact. - Publish the markdown summary and upload the JSON outputs as workflow artifacts.
- Optionally gate follow-up automation based on deterministic confidence and playbook thresholds in the action repository, not in core CLI logic.
Using a local binary:
faultline analyze build.log --format markdown > faultline-summary.md
faultline analyze build.log --json > faultline-analysis.json
faultline workflow build.log --json --mode agent > faultline-workflow.jsonUsing Docker:
docker run --rm -v "$PWD":/workspace faultline analyze /workspace/build.log --format markdown > faultline-summary.md
docker run --rm -v "$PWD":/workspace faultline analyze /workspace/build.log --json > faultline-analysis.json
docker run --rm -v "$PWD":/workspace faultline workflow /workspace/build.log --json --mode agent > faultline-workflow.json- name: Analyze failing job with Faultline
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
faultline analyze build.log --format markdown > faultline-summary.md
faultline analyze build.log --json > faultline-analysis.json
faultline workflow build.log --json --mode agent > faultline-workflow.json- Keep
workflow.v1stable unless an explicit breaking version is introduced. - Additive JSON fields are acceptable; silent field removals or renames are not.
- Bayesian reranking is enabled by default and must stay additive and explainable; it is a ranking aid, not a second matcher. Pass
--bayes=falseto disable. - If GitHub summaries or annotations need policy thresholds, keep those decisions in the action repository rather than the core CLI.
- Provider-backed delta is intentionally outside the shipped core CLI contract.