kevin@portfolio:~$ cat projects/taskflow-devsecops.md
# DevSecOps · AI Failure Intelligence
TaskFlow DevSecOps Pipeline
A CI/CD pipeline for a Go API that explains failed builds using similar past failures and an LLM report.
Numbers
Problem
When a CI pipeline fails, developers get a long raw log. Similar failures also repeat.
How it works
TaskFlow is a Go task API used as a DevSecOps case study. The pipeline runs tests, security scans, a Docker build, a push to GHCR and a smoke test. When a job fails, the failed logs are cleaned, the three most similar past failures are retrieved by embedding similarity, and an LLM writes a debugging report from that evidence. On success no AI call is made.
› hover or tap a node for a one-line explanation
- Push or pull request A change reaches main or develop.
- CI Go matrix, vet, race tests, integration tests, coverage gate, build.
- Security govulncheck and gosec, blocking on findings.
- CD Build and push the image to GHCR, then smoke test.
- Stable tag A successful image is tagged stable.
- Failure check Decides if any job failed. If not, no AI is called.
- Log cleaning Failed logs are collected, cleaned and secrets masked.
- Similar failures Top-3 matches from the knowledge base by cosine similarity.
- AI report An LLM writes a Markdown report from the evidence.
- Notify A Telegram summary is sent.
Key decisions
- 01
The LLM is only an explanation layer. Root-cause candidates come from the cleaned log and the retrieved similar failures, which lowers the risk of invented causes.
- 02
AI runs only on failure, so successful runs cost nothing.
- 03
A synthetic, validated knowledge base is used to start, because real failed logs were few. Entries are marked as synthetic.
- 04
The full cleaned log is the main retrieval query. The filtered suspicious lines only support the report.
Results
- Controlled evaluation of 15 failure scenarios: 15/15 Top-1 and 15/15 Top-3 with the full cleaned log.
- The filtered-lines variant scored 14/15 Top-1 and 15/15 Top-3.
- The knowledge base is synthetic and small (5 entries), so this measures a controlled setting.