Skip to content
Closed
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
61 changes: 29 additions & 32 deletions docs/superpowers/plans/2026-05-04-retro-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
| File | Responsibility |
|------|----------------|
| `agents/retro.md` | Agent system prompt — role, optimization goals, exploration instructions, output format |
| `harness/retro.yaml` | Harness config — links agent, policy, scripts, skills, env |
| `harness/retro.yaml` | Harness config — links agent, policy, scripts, skills, `env.runner`/`env.sandbox` ([ADR 0055](../../ADRs/0055-unified-env-var-delivery.md)) |
| `policies/retro.yaml` | Sandbox policy — read-only filesystem, network access for GitHub API |
| `env/retro.env` | Environment variables injected into sandbox |
| `scripts/pre-retro.sh` | Minimal pre-script — validates inputs, writes trigger context to agent_input |
| `scripts/post-retro.sh` | Post-script — reads proposal files, files GitHub issues, posts summary comment |
| `schemas/retro-result.schema.json` | JSON Schema for retro agent output |
Expand Down Expand Up @@ -178,30 +177,18 @@ git commit -m "feat(retro): add sandbox policy for retro agent"

---

### Task 3: Environment file
### Task 3: Environment configuration

**Files:**
- Create: `internal/scaffold/fullsend-repo/env/retro.env`
- Modify: `internal/scaffold/fullsend-repo/harness/retro.yaml` (see Task 8)
Comment on lines 182 to +183

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Informational

1. Task file action mismatch 🐞 Bug ≡ Correctness

Task 3 lists internal/scaffold/fullsend-repo/harness/retro.yaml as a file to modify, but Task 8
later instructs creating that same file, which conflicts with the plan’s sequential task flow. This
can cause confusion for agents/humans following the checklist and looking for a file that doesn’t
exist yet at Task 3 time.
Agent Prompt
## Issue description
Task 3 says to **modify** `internal/scaffold/fullsend-repo/harness/retro.yaml`, but Task 8 is where the plan actually **creates/writes** that file. This is internally inconsistent and can break the intended task-by-task execution order.

## Issue Context
The plan doc is meant to be executed sequentially using checkboxes. Referring to a file as “Modify” before it exists is confusing, even if it parenthetically points to Task 8.

## Fix Focus Areas
- docs/superpowers/plans/2026-05-04-retro-agent.md[180-192]
- docs/superpowers/plans/2026-05-04-retro-agent.md[637-646]

## Suggested fix
In **Task 3**, change the **Files** section to something like:
- (Option A) Remove the file entry entirely (since Task 3 is now guidance-only), or
- (Option B) Replace with: `- Configure in: internal/scaffold/fullsend-repo/harness/retro.yaml (created in Task 8)`

So Task 3 no longer implies an earlier modification of a not-yet-created file.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


The retro agent needs the originating URL, comment text (if `/fs-retro`), the repo name, and a GH_TOKEN for API access inside the sandbox.
Per [ADR 0055](../../ADRs/0055-unified-env-var-delivery.md), retro agent environment variables are declared in the harness `env.runner` and `env.sandbox` sub-maps (and `forge.github.env` for GitHub dispatch), not in a separate shell env file under `env/`.

- [ ] **Step 1: Create the env file**
The retro agent needs the originating URL, comment text (if `/fs-retro`), the repo name, and a GH_TOKEN for API access inside the sandbox. Configure these in Task 8's harness YAML.

```bash
export ORIGINATING_URL="${ORIGINATING_URL}"
export RETRO_COMMENT="${RETRO_COMMENT}"
export REPO_FULL_NAME="${REPO_FULL_NAME}"
export GH_TOKEN=${GH_TOKEN}
```
- [ ] **Step 1:** Do not create a standalone environment file under `internal/scaffold/fullsend-repo/env/` — superseded by ADR 0055.

Write this to `internal/scaffold/fullsend-repo/env/retro.env`.

- [ ] **Step 2: Commit**

```bash
git add internal/scaffold/fullsend-repo/env/retro.env
git commit -m "feat(retro): add environment file for retro agent"
```
- [ ] **Step 2:** Proceed to Task 8 for harness configuration including `env:` blocks.

---

Expand Down Expand Up @@ -664,15 +651,12 @@ policy: policies/retro.yaml

host_files:
- src: env/gcp-vertex.env
dest: /tmp/workspace/.env.d/gcp-vertex.env
expand: true
- src: env/retro.env
dest: /tmp/workspace/.env.d/retro.env
dest: /sandbox/workspace/.env.d/gcp-vertex.env
expand: true
- src: ${GOOGLE_APPLICATION_CREDENTIALS}
dest: /tmp/workspace/.gcp-credentials.json
dest: /tmp/.gcp-credentials.json
- src: ${GCP_OIDC_TOKEN_FILE}
dest: /tmp/workspace/.gcp-oidc-token
dest: /sandbox/workspace/.gcp-oidc-token
optional: true

skills:
Expand All @@ -686,14 +670,27 @@ validation_loop:

post_script: scripts/post-retro.sh

runner_env:
ORIGINATING_URL: ${ORIGINATING_URL}
RETRO_COMMENT: ${RETRO_COMMENT}
REPO_FULL_NAME: ${REPO_FULL_NAME}
GH_TOKEN: ${GH_TOKEN}
FULLSEND_OUTPUT_SCHEMA: ${FULLSEND_DIR}/schemas/retro-result.schema.json
env:
runner:
FULLSEND_OUTPUT_SCHEMA: ${FULLSEND_DIR}/schemas/retro-result.schema.json
sandbox:
RETRO_COMMENT: "${RETRO_COMMENT}"

timeout_minutes: 30

forge:
github:
pre_script: scripts/pre-retro.sh
post_script: scripts/post-retro.sh
env:
runner:
ORIGINATING_URL: "${ORIGINATING_URL}"
REPO_FULL_NAME: "${REPO_FULL_NAME}"
GH_TOKEN: "${GH_TOKEN}"
sandbox:
ORIGINATING_URL: "${ORIGINATING_URL}"
REPO_FULL_NAME: "${REPO_FULL_NAME}"
GH_TOKEN: "${GH_TOKEN}"
```

Write this to `internal/scaffold/fullsend-repo/harness/retro.yaml`.
Expand Down
Loading