Add CONTEXT.md for AI agent consumption - #2919
Conversation
Add a concise CONTEXT.md describing common tkn workflows, conventions, output formats, and behavioral notes for AI agents. Fixes tektoncd#2856 Assisted-by: Claude Sonnet 4.6 Signed-off-by: Debashich <debashishsinha555@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
|
Hi @vdemeester, this PR is ready for review whenever you have a chance. It implements the CONTEXT.md proposed in #2856. Thanks! |
divyansh42
left a comment
There was a problem hiding this comment.
Thanks for the PR @Debashich
I have added few comments. Please take a look and let me know what you think about it.
The document covers pipeline, task, pipelinerun, and taskrun. The CLI also supports other resources (customrun, eventlistener, triggerbinding, triggertemplate, clustertriggerbinding, bundle, hub). A brief one-liner acknowledging their existence would prevent agents from assuming these four are the only resources — something like:
Other resource types (eventlistener, triggerbinding, triggertemplate, customrun, clustertriggerbinding) support subsets of list, describe, and delete.
|
|
||
| | Resource | Verbs | | ||
| |---|---| | ||
| | `pipeline`, `task` | `list`, `describe`, `start`, `logs`, `delete`, `export` | |
There was a problem hiding this comment.
It seems export command is not present in the task. Can you please check once?
Ref: https://github.com/tektoncd/cli/blob/main/pkg/cmd/task/task.go#L40
There was a problem hiding this comment.
I verified it and made changes accordingly. Thanks for pointing this out!
| | `list` | Yes | Supported on all resources | | ||
| | `describe` | Yes | Supported on all resources | | ||
| | `logs` | No | Plain text to stdout only | | ||
| | `start` | No | Prints run name to stdout on success | |
There was a problem hiding this comment.
It seems --output flag is supported for the start commands which has the option for json output.
|
|
||
| --- | ||
|
|
||
| ## Common Flags |
There was a problem hiding this comment.
Missing an important flag for scripting/agent use: --exit-with-pipelinerun-error / -E, available on pipelinerun logs and pipeline start. This flag is essential for the Exit Codes section to be useful, and an agent doing CI automation would need it.
Consider adding:
--exit-with-pipelinerun-error,-E|pipelinerun logs,pipeline start| Exit with run status (0=success, 1=failed, 2=unknown)
|
Thanks for the review and the detailed feedback, @divyansh42 |
|
@Debashich with changes merged recently #2925 |
|
Thanks for addressing the earlier feedback! A couple of things still remain:
|
Add a concise CONTEXT.md describing common tkn workflows,
conventions, output formats, and behavioral notes for AI agents.
Fixes #2856
Assisted-by: Claude Sonnet 4.6
Changes
Add a new
CONTEXT.mdfile documenting common tkn workflows, conventions, output formats, and behavioral guidance for AI agents.Ran
make checklocally. The command fails because of existing lint issues in unrelated files, no new issues were introduced by this documentation only change.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make checkmake generatedSee the contribution guide
for more details.
Release Notes