# AI use cases for Code AF (Agent-Field/CodeAF)

Repo: [Agent-Field/CodeAF](https://github.com/Agent-Field/CodeAF) | Use cases: 5 | Page: https://dedupedai.com/use-cases/agent-field-codeaf/

CodeAF is an open-source Go coding harness for open models that runs as one local binary, with specialist subharnesses for coding, security audits and pull request reviews.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Audit local code changes for security problems: https://dedupedai.com/use-cases/agent-field-codeaf/security-audit-local-changes/
- Review a GitHub pull request with findings and reasons: https://dedupedai.com/use-cases/agent-field-codeaf/review-github-pull-request/
- Hand a coding fix to senior-dev on its own branch: https://dedupedai.com/use-cases/agent-field-codeaf/hand-coding-fix-to-senior-dev/
- Run a batch of coding tasks headless in CI or cron: https://dedupedai.com/use-cases/agent-field-codeaf/headless-batch-tasks-in-ci/
- Drive a coding agent on a remote dev box from your laptop: https://dedupedai.com/use-cases/agent-field-codeaf/drive-coding-agent-on-remote-devbox/

## How to audit local code changes for security problems with Code AF

Repo: [Agent-Field/CodeAF](https://github.com/Agent-Field/CodeAF) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run the sec specialist on changes since main and get findings with evidence and fixes.

**Who it is for:** A developer or security-minded engineer about to merge a branch who wants a second look at the security impact of the changes.

**The problem:** Changes pile up between merges and a manual security read of every diff is slow and easy to skip.

**The outcome:** A Markdown, JSON or SARIF report of security findings with evidence and suggested fixes, plus the coverage notes that show what was analyzed.

### Steps

1. Run `curl -fsSL https://agentfield.ai/get/codeaf | bash` and then `codeaf`.
2. Connect a provider on first start, in the browser through OpenRouter or with a key.
3. Open the project's folder in Code AF and type `/sec changes since main`.
4. Open the sec task to follow the work, then read the findings and the coverage notes in the report.
5. Treat the result as a review aid: a missing finding does not prove the code is free of security problems.

### Prompt to paste into your agent

```text
Use the CodeAF repo at Agent-Field/CodeAF. Install it with its curl script, open the git repository at <project-path>, and run `/sec changes since main` in the chat. Expected output: a security report with findings, evidence and suggested fixes, in Markdown, JSON or SARIF. Verify that the report lists its coverage and any incomplete analysis, and that your source files were not modified.
```

### Caveat

The README says the sec audit reads source code without running your tests, build, app or exploits, so its results are static analysis only.

Risk, remote script: The install step pipes a remote script from agentfield.ai into bash, so review it or pin a version from the releases page first.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/agent-field-codeaf/security-audit-local-changes/

## How to review a GitHub pull request with findings and reasons with Code AF

Repo: [Agent-Field/CodeAF](https://github.com/Agent-Field/CodeAF) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Run the review specialist on a PR and get findings with file locations and fixes.

**Who it is for:** A maintainer or reviewer with a pending pull request who wants a structured first pass before reading every line.

**The problem:** Reviewing a large pull request by hand takes time and it is easy to miss a risky area such as retry logic.

**The outcome:** A Markdown or JSON review with findings, file locations, reasons, suggested fixes and review coverage, which the reviewer can act on.

### Steps

1. Install Code AF with `curl -fsSL https://agentfield.ai/get/codeaf | bash`, then start it with `codeaf`.
2. Connect a model provider on first start.
3. In the chat, type `/review owner/repo#123 focus on retries`, replacing the repository and pull request number.
4. Open the review task to follow progress and read the findings with their file locations.
5. Read the coverage section before acting, and request posting or fixes as a separate step.

### Prompt to paste into your agent

```text
Use the CodeAF repo at Agent-Field/CodeAF. After installing it, run `/review <owner>/<repo>#<number> focus on retries` in the chat. Expected output: a review report with findings, file locations, reasons, suggested fixes and coverage, in Markdown or JSON. Verify that the code was not changed and that the coverage section lists what was not analyzed.
```

### Caveat

The README says review is imported from PR-AF and that its benchmark results belong to the original project, not to codeaf's imported review specialist.

Risk, remote script: The install step pipes a remote script from agentfield.ai into bash, so review it or pin a version from the releases page first.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/agent-field-codeaf/review-github-pull-request/

## How to hand a coding fix to senior-dev on its own branch with Code AF

Repo: [Agent-Field/CodeAF](https://github.com/Agent-Field/CodeAF) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Describe a bug and let senior-dev change code in a private copy, then check the results.

**Who it is for:** A developer with a failing test or a known bug who wants a change drafted and tested without touching their working branch.

**The problem:** Fixing a bug and adding tests takes context switching, and running it in the main working copy risks mixing unrelated edits.

**The outcome:** A submitted change on its own branch with the project's build and test results, or a plain explanation of what could not be checked.

### Steps

1. Install Code AF with `curl -fsSL https://agentfield.ai/get/codeaf | bash`, then run `codeaf`.
2. Open a git project in Code AF and connect a provider.
3. Type `/senior-dev fix the retry bug and add tests` in the chat.
4. Open the senior-dev task to follow the work or stop it.
5. Review the submitted change and its build and test results before merging it yourself.

### Prompt to paste into your agent

```text
Use the CodeAF repo at Agent-Field/CodeAF. Install it, open the git repository at <project-path>, and run `/senior-dev <describe the bug and tests>`. Expected output: a submitted change on its own branch with build and test results. Verify that your working branch and main were not changed and that the reported test results match a local run.
```

### Caveat

The README says the senior-dev benchmark used DeepSeek V4 Flash across 113 DeepSWE issues, so its results on your own project will vary.

Risk, remote script: The install step pipes a remote script from agentfield.ai into bash, so review it or pin a version from the releases page first.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/agent-field-codeaf/hand-coding-fix-to-senior-dev/

## How to run a batch of coding tasks headless in CI or cron with Code AF

Repo: [Agent-Field/CodeAF](https://github.com/Agent-Field/CodeAF) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Use codeaf do with a timeout and JSON output to run unattended work from scripts.

**Who it is for:** A platform engineer who wants a scheduled job or CI step to make dependency or cleanup changes with no one watching the chat.

**The problem:** Routine maintenance work such as dependency bumps gets postponed because it needs someone at a terminal.

**The outcome:** One JSON object and an exit code per run, so the job can pass or fail on its own.

### Steps

1. Install Code AF with `curl -fsSL https://agentfield.ai/get/codeaf | bash`.
2. Set your provider key in the environment of the CI job or cron host.
3. Run `codeaf do "<your brief>" --timeout 30m --json` from the repository directory. (inferred, check the README)
4. Read the JSON output and the exit code in the job log.
5. Read the headless contract in docs/HEADLESS.md before relying on it in production.

### Prompt to paste into your agent

```text
Use the CodeAF repo at Agent-Field/CodeAF. In a CI job for <repo-path>, run `codeaf do "<brief>" --timeout 30m --json`. Expected output: one JSON object and an exit code. Verify the JSON result and exit code match the work that landed on the branch, and that the job fails when the exit code is nonzero.
```

### Caveat

The README says codeaf do records an assumption when the conversation would ask a question, so unattended runs may proceed on guesses you should check.

Risk, credentials: The provider key must be stored as a CI secret or environment variable, not written into the repository or the job script.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/agent-field-codeaf/headless-batch-tasks-in-ci/

## How to drive a coding agent on a remote dev box from your laptop with Code AF

Repo: [Agent-Field/CodeAF](https://github.com/Agent-Field/CodeAF) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Run the conversation on a remote machine with codeaf chat --host and keep the work going.

**Who it is for:** A developer whose code and build resources live on a remote dev box and who wants to start, watch and steer agent work from a laptop or phone.

**The problem:** Running agents over ssh in tmux is laggy, and work stops when the laptop connection drops.

**The outcome:** A live conversation on the dev box that keeps running through a dropped link, and that you can reach from the laptop or a mobile terminal.

### Steps

1. Install Code AF on the dev box and on your laptop with `curl -fsSL https://agentfield.ai/get/codeaf | bash`.
2. Confirm your own ssh config reaches the dev box, since Code AF uses your ssh config, keys and jump hosts.
3. On your laptop, run `codeaf chat --host devbox`, replacing devbox with your host name.
4. Start work in a project on the dev box and close the laptop if you like; the conversation keeps running there.
5. Reconnect later and check the questions waiting for you.

### Prompt to paste into your agent

```text
Use the CodeAF repo at Agent-Field/CodeAF. Install it on a dev box named <host> and on a laptop, then run `codeaf chat --host <host>` from the laptop. Expected output: the live conversation of the dev box in the local terminal. Verify that a task started on the dev box keeps running after the laptop disconnects and that its result is visible on reconnect.
```

### Caveat

The README says reaching a machine with no ssh at all through a relay is built but not yet switched on, so this use case needs ssh access to the dev box.

Risk, remote script: The install step on both machines pipes a remote script from agentfield.ai into bash, so review it or pin a version first.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/agent-field-codeaf/drive-coding-agent-on-remote-devbox/
