Skip to content

Commit 2179444

Browse files
authored
feat(infra): containerized worktrees with Podman pods (#462) (#463)
1 parent 20e56e9 commit 2179444

16 files changed

Lines changed: 1397 additions & 339 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@frontman-ai/astro": patch
3+
"@frontman/client": patch
4+
---
5+
6+
Fix trailing-slash 404 on Frontman API routes behind reverse proxy and mixed-content URL scheme mismatch when running behind TLS-terminating proxy (Caddy). Add containerized worktree infrastructure with Podman pods for parallel isolated development.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ Thumbs.db
4747
opencode.json*
4848
scripts/certs/
4949
mprocs.log
50+
51+
# Containerized worktree infra (auto-generated)
52+
infra/local/Caddyfile
53+
.env.secrets.resolved

.opencode/commands/work.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
description: Set up a containerized worktree for a GitHub issue or PR
3+
---
4+
5+
Set up a containerized worktree, then ask the user to re-open the agent from it.
6+
7+
## Input
8+
9+
The user provided: `$ARGUMENTS`
10+
11+
This can be:
12+
- **Issue URL**: contains `/issues/` (e.g. `https://github.com/frontman-ai/frontman/issues/462`)
13+
- **Issue number**: a plain number (e.g. `462`)
14+
- **PR URL**: contains `/pull/` (e.g. `https://github.com/frontman-ai/frontman/pull/99`)
15+
- **PR number**: prefixed with `#` or context makes it clear it's a PR
16+
17+
## Steps
18+
19+
### 1. Detect input type and determine branch name
20+
21+
- **Issue** (contains `/issues/` or is a plain number):
22+
```bash
23+
gh issue view <NUMBER> --json number,title,body,labels
24+
```
25+
Branch name: `issue-<NUMBER>-<short-slug>` (slug: max 4 words from title, kebab-case)
26+
27+
- **PR** (contains `/pull/`):
28+
```bash
29+
gh pr view <NUMBER> --json number,title,body,headRefName,labels
30+
```
31+
Branch name: use the PR's `headRefName` as-is.
32+
Fetch the branch: `git fetch origin <branch-name>`
33+
34+
### 2. Set up containerized worktree
35+
36+
1. Check infra: `make infra-status` — run `make infra-up` if needed
37+
2. Check if pod already exists: `make worktree-pod-list`
38+
- If running → skip creation
39+
- If stopped → `make worktree-pod-start BRANCH=<branch-name>`
40+
- If missing → `make worktree-pod-create BRANCH=<branch-name>`
41+
3. Verify: `make worktree-pod-list`
42+
43+
### 3. Tell the user to re-open the agent
44+
45+
Print this message (fill in the branch name):
46+
47+
```
48+
Worktree is ready. To start working, open your agent from the worktree directory:
49+
50+
cd .worktrees/<branch-name>
51+
# then start your agent (claude, opencode, etc.)
52+
53+
Start the dev servers in another terminal:
54+
55+
make worktree-pod-dev BRANCH=<branch-name>
56+
```
57+
58+
**Do NOT attempt to implement anything.** The agent cannot operate on files in the worktree from the repo root. The user must re-open the agent from the worktree directory.

AGENTS.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)