Conversation
This is to centralise the automated workflow definition, so we don't have to keep it up to date everywhere. The definition can either be static, or better, it can refer to guidelines in the individual repos.
| secrets: | ||
| CLAUDE_CODE_OAUTH_TOKEN: | ||
| description: A Claude Code access token. Supply this **or** ANTHROPIC_API_KEY. | ||
| ANTHROPIC_API_KEY: |
There was a problem hiding this comment.
I used one of these (as created in the Anthropic console), but I note that our repos have a CLAUDE_CODE_OAUTH_TOKEN (I don't know how to get one of those) -- they are not interchangeable, so I've made it possible to supply either.
eb90e3d to
e49eeac
Compare
|
I've been using a PR in https://github.com/nscaledev/uni-shared-workflow-tester, which calls the workflow here, to experiment. Some results (most recent to least):
|
3b8328e to
1ba54de
Compare
This needs to be suplied by the caller, since it's not (at present at least) a secret at the org level. Claude acvtions elsewhere use a Claude API token, but I needed to use an API key. I have allowed for both by making them optional and supplying both (as possibly empty values).
This tries to bias the output towards an evaluation of the pull request as submitted, including the summary. - Throw in "team-oriented" and "experienced" as framing (I have not much idea how it influences the output to be honest). - "dispassionate" too; this seems to dial down the cheerleading. - with the built-in prompt there is often a wordy recapitulation of the content of the diff, which is needless -- so, this custom prompt asks for not that. - Ask for Claude to compare the PR summary with the diff, specifically, as this doesn't come through with the built-in prompt. The overall effect (I hope, but we shall see) is for the machine to treat the pull request as an argument for the patch therein. The alternative (and default) is to assume the diff is self-evidently necessary, which is seldom the case.
1ba54de to
5b54bc5
Compare
|
I wanted this to centralise the guidelines (what would go in CLAUDE.md) but I couldn't get this to work reliably. Locally it's possible to put a CLAUDE.md in another directory and use I tried implementing this in the workflow by checking out this repo (fine) alongside the repo under review (I couldn't get the checkout action to do this in an acceptable way, either you supply |
|
@peterj-ns After experiments I reduced this to a callable workflow, which at least means we can just call with a secret and keep the (minimal) prompt and other parameters centrally. |
This takes the Claude workflow definition as it is in nscaledev/uni-region#381, tweaks it a little to make it more robust when files aren't present, and puts it in a
workflow_calltrigger.This means you can call it from another repo, and it'll act locally; and that means we can have centralised prompts (as below), but local guidelines (as in CLAUDE.md), which makes it much easier to evolve our reviews.
Fixes INST-545.