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
4 changes: 4 additions & 0 deletions docs/agents/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ on issues (not PRs). The code agent is also triggered automatically when the
See [Customizing with AGENTS.md](../guides/user/customizing-with-agents-md.md) and
[Customizing with Skills](../guides/user/customizing-with-skills.md).

### Variables

None.

## Source

[`internal/scaffold/fullsend-repo/harness/code.yaml`](../../internal/scaffold/fullsend-repo/harness/code.yaml)
4 changes: 4 additions & 0 deletions docs/agents/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ Remove the label or use `/fs-fix` to re-engage.
See [Customizing with AGENTS.md](../guides/user/customizing-with-agents-md.md) and
[Customizing with Skills](../guides/user/customizing-with-skills.md).

### Variables

None.

## Source

[`internal/scaffold/fullsend-repo/harness/fix.yaml`](../../internal/scaffold/fullsend-repo/harness/fix.yaml)
4 changes: 4 additions & 0 deletions docs/agents/prioritize.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ This gives the prioritize agent concrete data to distinguish between "one user
wants this" (Reach 0.25) and "three strategic accounts have filed support cases
about it" (Reach 2.0), instead of guessing from the issue text alone.

### Variables

None.

## Source

[`internal/scaffold/fullsend-repo/harness/prioritize.yaml`](../../internal/scaffold/fullsend-repo/harness/prioritize.yaml)
4 changes: 4 additions & 0 deletions docs/agents/retro.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ The retro agent does not apply or consume control labels.
See [Customizing with AGENTS.md](../guides/user/customizing-with-agents-md.md) and
[Customizing with Skills](../guides/user/customizing-with-skills.md).

### Variables

None.

## Source

[`internal/scaffold/fullsend-repo/harness/retro.yaml`](../../internal/scaffold/fullsend-repo/harness/retro.yaml)
16 changes: 16 additions & 0 deletions docs/agents/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,22 @@ the upstream default -- no other configuration needed.
See [Customizing with AGENTS.md](../guides/user/customizing-with-agents-md.md) and
[Customizing with Skills](../guides/user/customizing-with-skills.md).

### Variables

| Variable | Description | Default | Valid values |
|----------|-------------|---------|--------------|
| `REVIEW_FINDING_SEVERITY_THRESHOLD` | Minimum severity for findings to include in the review. Findings below this level are omitted from both the narrative body and the posted inline comments. | `low` | `info`, `low`, `medium`, `high`, `critical` |

Set this in the CI workflow `env:` block. The env file passes it to the
sandbox automatically, and the post-script reads it from the runner
environment directly — no separate configuration is needed.

The review agent omits findings below the threshold from its output. The
post-script also filters the structured `findings` array as
defense-in-depth. When filtering removes all findings from a
`request-changes` or `reject` verdict, the post-script downgrades the
verdict to `comment` (applying the `requires-manual-review` label).

## Source

[`internal/scaffold/fullsend-repo/harness/review.yaml`](../../internal/scaffold/fullsend-repo/harness/review.yaml)
4 changes: 4 additions & 0 deletions docs/agents/triage.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ This gives the triage agent the subtlety it needs to distinguish between
controller-runtime code, without adding label documentation to `AGENTS.md`
where every agent would pay the context cost.

### Variables

None.

## Source

[`internal/scaffold/fullsend-repo/harness/triage.yaml`](../../internal/scaffold/fullsend-repo/harness/triage.yaml)
29 changes: 29 additions & 0 deletions hack/lint-agent-docs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,35 @@ for yaml_file in "$HARNESS_DIR"/*.yaml; do
fi
done

echo ""
echo "Checking for ### Variables subsection..."
echo "================================================"

for yaml_file in "$HARNESS_DIR"/*.yaml; do
doc_value="$(grep -E '^doc:' "$yaml_file" | sed 's/^doc:[[:space:]]*//' || true)"
if [[ -z "$doc_value" ]]; then
continue
fi
doc_path="$REPO_ROOT/$doc_value"
if [[ ! -f "$doc_path" ]]; then
continue
fi
doc_basename="$(basename "$doc_value")"

# Only check docs that have the Configuration section
if ! awk 'BEGIN{f=0} /^```/{f=1-f; next} f==0 && /^## Configuration and extension/{found=1} END{exit !found}' "$doc_path"; then
continue
fi

# Look for ### Variables under ## Configuration and extension (not just anywhere)
if ! awk 'BEGIN{f=0;c=0} /^```/{f=1-f;next} f{next} /^## Configuration and extension/{c=1;next} /^## /{c=0} c && /^### Variables/{found=1} END{exit !found}' "$doc_path"; then
echo " $doc_basename: missing \"### Variables\" subsection under \"## Configuration and extension\""
errors=$((errors + 1))
else
echo " $doc_basename: OK"
fi
done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[medium] lint-gap — ### Variables check is not positional

The awk command checks that ### Variables exists anywhere in the file outside fenced code blocks. It does not verify it appears between ## Configuration and extension and the next ## heading. A doc with ### Variables under the wrong section would pass.

Suggestion: Combine into a single awk pass that tracks section context:

awk 'BEGIN{f=0;c=0} /^```/{f=1-f;next} f{next}
  /^## Configuration and extension/{c=1;next} /^## /{c=0}
  c && /^### Variables/{found=1} END{exit !found}' "$doc_path"

Flagged by 4/6 review agents (Claude, Gemini) — consensus

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch — made the awk check positional in 2174998. It now tracks whether we're inside ## Configuration and extension before looking for ### Variables.


echo ""
echo "================================================"
if [[ $errors -gt 0 ]]; then
Expand Down
18 changes: 18 additions & 0 deletions internal/scaffold/fullsend-repo/agents/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ NOTE: the Agent tool MUST ONLY be invoked with prompts read from
severities. Absent on first review or when provenance validation
fails.

## Severity filtering

If `$REVIEW_FINDING_SEVERITY_THRESHOLD` is set to a non-empty value,
use it as the minimum severity for findings to include. When unset or
empty, treat the threshold as `low`. The severity order from lowest to
highest is:

info < low < medium < high < critical

When the threshold is `low` (the default), suppress `info`-level
findings — do not mention them in the review body and do not include
them in the `findings` array.

This filtering applies to the narrative body text and the structured
findings equally. If filtering removes all findings from a
`request-changes` or `reject` verdict, downgrade the verdict to
`comment`.

## Identity

You **either**:
Expand Down
1 change: 1 addition & 0 deletions internal/scaffold/fullsend-repo/env/review.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export PR_NUMBER="${PR_NUMBER}"
export REPO_FULL_NAME="${REPO_FULL_NAME}"
export PRIOR_REVIEW_SHA="${PRIOR_REVIEW_SHA}"
export PRIOR_REVIEW_PROVENANCE="${PRIOR_REVIEW_PROVENANCE}"
export REVIEW_FINDING_SEVERITY_THRESHOLD="${REVIEW_FINDING_SEVERITY_THRESHOLD}"
Loading
Loading