Skip to content
Open
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
5 changes: 5 additions & 0 deletions internal/scaffold/fullsend-repo/agents/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ triggered this fix run (e.g., `"orgname-review[bot]"` for bot-triggered,
triggers. When triggered by a human (username doesn't end in `[bot]`), the
`HUMAN_INSTRUCTION` environment variable contains the instruction text.

**Important:** `TRIGGER_SOURCE` is a GitHub username — not the value you
write to `fix-result.json`. The `trigger_source` field in structured output
must be normalized to `"bot"` or `"human"` (the schema enum). Map it:
if the username ends in `[bot]`, use `"bot"`; otherwise use `"human"`.

## Zero-trust principle

You do not trust the review agent's analysis unconditionally. The review
Expand Down
37 changes: 28 additions & 9 deletions internal/scaffold/fullsend-repo/skills/fix-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,14 @@ echo "FIX_ITERATION=${FIX_ITERATION:-1}"
```

- `PR_NUMBER` — which PR to fix (required)
- `TRIGGER_SOURCE` — GitHub username that triggered the fix (e.g., `"orgname-review[bot]"` or `"alice"`)
- `HUMAN_INSTRUCTION` — the human's instruction text (only when `TRIGGER_SOURCE` doesn't end in `[bot]`)
- `TRIGGER_SOURCE` — GitHub username that triggered the fix (e.g.,
`"orgname-review[bot]"` or `"alice"`). **This is a username, not the
value you write to `fix-result.json`.** Derive the normalized trigger
type now — you will need it in step 9:
- If `TRIGGER_SOURCE` ends in `[bot]` → trigger type is `"bot"`
- Otherwise → trigger type is `"human"`
- `HUMAN_INSTRUCTION` — the human's instruction text (only when
`TRIGGER_SOURCE` doesn't end in `[bot]`)
- `FIX_ITERATION` — which iteration of the review→fix loop this is

If `PR_NUMBER` is not set, stop.
Expand Down Expand Up @@ -401,16 +407,29 @@ Write a JSON file to `$FULLSEND_OUTPUT_DIR/fix-result.json`:
}
```

**Schema compliance — read carefully.** The schema uses
`additionalProperties: false` at both the top level and inside each action
object. Any extra fields you invent will cause validation to fail. Only use
the fields shown in this section.

**`trigger_source` field:** This must be the **normalized trigger type** you
derived in step 1 — either `"bot"` or `"human"`. Do NOT use the raw
`TRIGGER_SOURCE` environment variable value (the GitHub username). The schema
enforces an enum of `["bot", "human"]`; any other value fails validation.

**Action types:**

- `fix` — You fixed the code per the reviewer's feedback. The post-script
- `fix` — You fixed the code per the reviewer's feedback. **Required fields
for fix actions:** `type`, `finding`, `description`. The post-script
includes this in the summary comment.
- `disagree` — You determined the feedback is incorrect or out of scope. The
post-script includes your reason in the summary. The reviewer can insist
in the next review cycle.

**Required fields:** `pr_number`, `trigger_source`, `actions`, `summary`,
`tests_passed`, `files_changed`.
- `disagree` — You determined the feedback is incorrect or out of scope.
**Required fields for disagree actions:** `type`, `finding`, `reason`.
The post-script includes your reason in the summary. The reviewer can
insist in the next review cycle.

**Required top-level fields:** `pr_number`, `trigger_source`, `actions`,
`summary`, `tests_passed`, `files_changed`. The `actions` array must
contain at least one item.

Write the file using `Bash`:

Expand Down
Loading