Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ per-example notes), then launch with `afk` / `hitl`.
| Contributor / air-gapped / custom image | [`build-from-source/`](build-from-source/) | claude | built `:local` | builds images yourself |
| Reproducible — lock versions | [`pinned-reproducible/`](pinned-reproducible/) | claude | pinned `:vX.Y.Z` | inner **and** outer image pinned |
| Many issues in parallel | [`parallel-throughput/`](parallel-throughput/) | claude | prebuilt GHCR `:latest` | `AGENTIC_CONCURRENCY` > 1 |
| Non-TypeScript target project (dotnet) | [`dotnet-project/`](dotnet-project/) | claude | built `Dockerfile.dotnet` `:local` | targets an external repo via `AGENTIC_REPO` |

## Common to every example

Expand Down
51 changes: 51 additions & 0 deletions examples/dotnet-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# dotnet: non-TypeScript target project

Run `/afk`/`/hitl` against a dotnet (C#) target project instead of the
default JS/TS assumption — the first validated non-TypeScript recipe. See
[ADR-0024](../../docs/adr/0024-sandcastle-is-not-a-language-constraint.md)
and [ADR-0002's addendum](../../docs/adr/0002-lean-inner-image-per-project-extension.md)
for why this is purely a Dockerfile + config recipe, with no changes needed
to the orchestrator itself.

This recipe is validated against a small, purpose-built fixture repo
([`lsfera/dotnet-afk-proof`](https://github.com/lsfera/dotnet-afk-proof),
private) rather than a real production dotnet codebase — copy the pattern
and point `AGENTIC_REPO` at your own project instead.

## Setup

1. Build the dotnet inner image from the `.sandcastle` context:

```bash
docker build -f .sandcastle/Dockerfile.dotnet -t sandcastle-dotnet:local .sandcastle
```

To make the image **owned** (so the #40 orphan sweep won't let another
project reap its sandboxes), add `--build-arg AGENTIC_PROJECT=<name>`.

2. Copy the config and add your tokens:

```bash
cp examples/dotnet-project/orchestrator.env .sandcastle/orchestrator.env
# then edit .sandcastle/orchestrator.env → set GH_TOKEN, and AGENTIC_REPO
# if targeting your own dotnet project instead of the validation fixture

printf 'CLAUDE_CODE_OAUTH_TOKEN=%s\n' "$(claude setup-token)" > .sandcastle/.env
```

## Run

```bash
afk # autonomous
hitl # reviewed
```

## Adapting this to another language

The pattern generalizes: swap `Dockerfile.dotnet`'s base image
(`mcr.microsoft.com/dotnet/sdk:8.0`) for the lean official upstream image of
your language (e.g. `rust:1-slim`, `python:3.12-slim`), keep the same
git+curl install, non-root user rename, and native Claude Code CLI installer
(`curl -fsSL https://claude.ai/install.sh | bash` — no Node dependency), and
point `SANDCASTLE_IMAGE` at the result. No orchestrator code changes are
needed for any language — see ADR-0024.
19 changes: 19 additions & 0 deletions examples/dotnet-project/orchestrator.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Use case: run /afk & /hitl against a non-TypeScript (dotnet) target project.
# Validates the per-language Dockerfile recipe from ADR-0002's addendum /
# ADR-0024 — no orchestrator code changes, just a different inner image and
# target repo. Copy to .sandcastle/orchestrator.env and fill GH_TOKEN.

# Orchestrator's gh token (issue list/label/comment, PR create). Host: `gh auth token`.
GH_TOKEN=

# Build the dotnet inner image first (from the .sandcastle context):
# docker build -f .sandcastle/Dockerfile.dotnet -t sandcastle-dotnet:local .sandcastle
SANDCASTLE_IMAGE=sandcastle-dotnet:local

# Target repo is NOT the one `gh` detects from the working directory here —
# this recipe validates against a small, purpose-built dotnet fixture repo,
# so AGENTIC_REPO is set explicitly rather than left to the default.
AGENTIC_REPO=lsfera/dotnet-afk-proof

# Claude tier only for this recipe (no opencode/local variant yet) — this is
# already the default, so no AGENTIC_TIER override needed here.
Loading