Skip to content

feat(#1309): add mandatory finding for agent behavior definition changes - #2133

Closed
fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/1309-agent-behavior-review-rule
Closed

feat(#1309): add mandatory finding for agent behavior definition changes#2133
fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/1309-agent-behavior-review-rule

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Add a new Platform Security rule to the code-review skill that instructs the review agent to always produce a finding when a diff modifies files that define agent behavior. This closes a governance gap where the review agent could silently approve changes to its own skill definitions, agent definitions, harness configs, or policy files without flagging them for human review.

The rule covers four file patterns: skills//SKILL.md, agents/.md, harness/.yaml, and policies/.yaml. Severity is info for additive changes and medium for modifications that relax existing checks or remove constraints.

Note: make lint could not run due to Go module cache permission errors in the sandbox (infrastructure issue, not code-related). This is a Markdown-only change with no Go code modifications.


Closes #1309

Post-script verification

  • Branch is not main/master (agent/1309-agent-behavior-review-rule)
  • Secret scan passed (gitleaks — eda1e12306a7a4393c077260bcd5acde491b8649..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

Site preview

Preview: https://a49a1013-site.fullsend-ai.workers.dev

Commit: 984db7ae0e957f888694290685c042ea19c5da46

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 10, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:13 PM UTC · Completed 5:22 PM UTC
Commit: 4ed6da4 · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:148 — The new rule introduces category agent-behavior-definition, but this category is absent from the pr-review routing table (step 3a in skills/pr-review/SKILL.md). The fallback rule routes unrecognized categories to the nearest matching dimension by keyword, or to correctness as a fallback. Since agent-behavior-definition does not keyword-match any dimension name, prior findings with this category will be misrouted to correctness during re-reviews instead of security. Additionally, the security sub-agent definition (sub-agents/security.md) does not receive code-review/SKILL.md content during pr-review orchestration — sub-agents receive only their own definition file, the meta-prompt, and the context package. Therefore, the security sub-agent will not see the mandatory-finding rule during pr-review orchestration and will not produce agent-behavior-definition findings. The rule works correctly when code-review is invoked standalone, but during pr-review orchestration there are two gaps: (1) the security sub-agent lacks instructions to produce agent-behavior-definition findings, and (2) prior findings with this category will route to correctness instead of security.
    Remediation: Add agent-behavior-definition to the security row in the pr-review routing table at skills/pr-review/SKILL.md. Also add agent behavior definition file coverage to the security sub-agent's Own section in sub-agents/security.md.
Previous run

Review

Findings

Medium

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:148 — The new rule introduces category agent-behavior-definition, but this category is absent from the pr-review routing table (step 3a in skills/pr-review/SKILL.md). The fallback rule routes unrecognized categories to the nearest matching dimension by keyword, or to correctness as a fallback. Since agent-behavior-definition does not keyword-match any dimension name, prior findings with this category will be misrouted to correctness during re-reviews instead of security. Additionally, the security sub-agent definition (sub-agents/security.md) does not receive code-review/SKILL.md content during pr-review orchestration — sub-agents receive only their own definition file, the meta-prompt, and the context package. Therefore, the security sub-agent will not see the mandatory-finding rule during pr-review orchestration and will not produce agent-behavior-definition findings. The rule works correctly when code-review is invoked standalone, but during pr-review orchestration there are two gaps: (1) the security sub-agent lacks instructions to produce agent-behavior-definition findings, and (2) prior findings with this category will route to correctness instead of security.
    Remediation: Add agent-behavior-definition to the security row in the pr-review routing table at skills/pr-review/SKILL.md step 3a. Also add agent behavior definition file coverage to the security sub-agent's Own section in sub-agents/security.md.

Low

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:152 — The severity guidance covers two cases — info for additive changes and medium for relaxations/removals — but provides no guidance for neutral modifications such as rewording a rule for clarity, reordering bullets, or fixing typos in agent behavior definition files. These are neither additive nor relaxing, creating an ambiguous gap that could lead to inconsistent severity assignments across reviews.

  • [pattern-inconsistency] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:151 — The new 'Agent behavior definition changes' bullet uses inline severity specification format 'Severity: info for...' and 'medium for...' while the existing 'Permission manifest changes' bullet uses embedded severity format 'must be at least high severity' and 'is still a finding (info)'. These two mandatory-finding sections use different formatting conventions for severity specifications.

Info

  • [agent-behavior-definition] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — This PR modifies a skill definition file that controls how the review agent evaluates changes. The modification is purely additive: it introduces a new mandatory-finding rule. No existing checks are relaxed, removed, or weakened. This PR is self-referential — the new rule would flag this very PR, which is the correct and intended behavior.

  • [design-coherence] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The proposed rule aligns with the 'No agent self-modification' principle established in governance.md and security-threat-model.md. The rule follows the existing pattern of the 'Permission manifest changes' mandatory-finding rule.

  • [scope-authorization] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The PR correctly traces to issue code-review skill: mandatory finding when diff modifies review agent behavior files #1309. The implementation matches the issue description: covers four file patterns, uses info/medium severity as proposed, and addresses the governance gap identified in the issue. Scope is appropriate and authorized.

Previous run (2)

Review

Findings

Medium

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:148 — The new rule introduces category agent-behavior-definition, but this category is not listed in the pr-review routing table (pr-review/SKILL.md step 3a). The fallback rule routes unrecognized categories to the nearest matching dimension by keyword, or to correctness as a fallback. Since agent-behavior-definition does not keyword-match any dimension name, these findings will be routed to correctness during re-reviews. Additionally, the security sub-agent definition (sub-agents/security.md) does not mention agent behavior definition files in its Own section, so it has no instruction to produce these findings during pr-review orchestration. The rule functions correctly when code-review is invoked standalone, but during pr-review orchestration there are two gaps: (1) the security sub-agent won't know to produce agent-behavior-definition findings, and (2) prior findings with this category will be routed to correctness instead of security.
    Remediation: Add agent-behavior-definition to the security row of the routing table in pr-review/SKILL.md (step 3a). Also add agent behavior definition files to the security sub-agent's Own section in sub-agents/security.md.

Low

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:152 — The severity guidance covers two cases — info for additive changes and medium for relaxations/removals — but provides no guidance for neutral modifications such as rewording a rule for clarity, reordering bullets, or fixing typos in agent behavior definition files. These are neither additive nor relaxing, creating an ambiguous gap that could lead to inconsistent severity assignments across reviews.

Info

  • [agent-behavior-definition] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — This diff modifies a skill definition file that controls how the review agent evaluates changes. The modification is purely additive: it introduces a new mandatory-finding rule requiring the agent to flag any diff that touches agent behavior files. No existing checks are relaxed, removed, or weakened. This PR is self-referential — the new rule would flag this very PR, which is the correct and intended behavior.

  • [design-coherence] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The proposed rule aligns with the governance principle of no agent self-modification and the security threat model's discussion of agent blind spots. The rule follows the existing pattern of the "Permission manifest changes" mandatory-finding rule (lines 128–142 of SKILL.md).

  • [scope-authorization] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The PR correctly traces to issue code-review skill: mandatory finding when diff modifies review agent behavior files #1309. The implementation matches the issue description: covers four file patterns, uses info/medium severity as proposed, and addresses the governance gap identified in the issue. Scope is appropriate and authorized.

  • [pattern-inconsistency] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:151 — The severity specification uses Severity: **info** for... and **medium** for... with bold formatting. The comparable pattern in the Permission manifest changes bullet uses must be at least **high** severity (bold + "severity" suffix). The two constructs serve different purposes (mapping vs. floor), but the formatting divergence is a minor inconsistency.


Labels: PR modifies a scaffolded skill definition to address a security governance gap in agent self-review.

Previous run (3)

Review

Findings

Medium

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:148 — The new rule introduces category agent-behavior-definition, but this category is not listed in the pr-review routing table (pr-review/SKILL.md step 3a). Per the routing table rules, unrecognized categories fall back to correctness as a fallback. Additionally, the security sub-agent definition (sub-agents/security.md) does not mention agent behavior definition files in its Own section, so it will not know to produce these findings during pr-review orchestration. The rule functions correctly only when code-review is invoked standalone. During pr-review: (1) the security sub-agent has no instruction to produce agent-behavior-definition findings; (2) during re-reviews, prior findings with this category will be routed to correctness, which lacks context to evaluate them.

Low

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:152 — The severity guidance is incomplete for neutral modifications — changes that neither add new checks nor relax existing ones (e.g., rewording a rule for clarity, reordering bullets, fixing typos). The rule specifies info for additive changes and medium for relaxations/removals but provides no guidance for neutral edits, which could lead to inconsistent severity assignments.

Info

  • [agent-behavior-definition] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — This diff modifies a skill definition file that controls how the review agent evaluates changes. The modification is additive: it introduces a new mandatory-finding rule requiring the agent to flag changes to its own instruction files. No existing checks are relaxed, removed, or weakened. This PR is self-referential — the new rule would flag this very PR, which is the correct and intended behavior.

  • [design-coherence] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The proposed rule aligns with the governance principle of no agent self-modification and the security threat model's discussion of agent blind spots. The rule follows the existing pattern of the "Permission manifest changes" mandatory-finding rule (lines 128–142 of SKILL.md).

  • [scope-authorization] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The PR correctly traces to issue code-review skill: mandatory finding when diff modifies review agent behavior files #1309. The implementation matches the issue description: covers four file patterns, uses info/medium severity as proposed, and addresses the governance gap identified in the issue. Scope is appropriate and authorized.

Previous run (4)

Review

Findings

Low

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — The new "Agent behavior definition changes" rule does not specify a finding category name. The routing table in step 3a of pr-review/SKILL.md enumerates recognized categories per dimension; an ad-hoc category string from this rule would fall through to the "correctness" dimension as a fallback. The security sub-agent's "Own" section also does not list agent behavior definition files, though the rule lives in the Security section of SKILL.md, which partially mitigates the routing ambiguity for first reviews. The concern is narrow: it only affects re-review severity anchoring when prior findings from this rule exist.

  • [formatting-consistency] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:152 — Uses **Medium** with uppercase "M". Existing severity references in the same file use lowercase: **high** (line 137), **medium** (lines 261, 263), **info** (line 266). Should be **medium** for consistency.

Info

  • [agent-behavior-definition] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — This diff modifies a skill definition file that controls how the review agent evaluates changes. The modification is additive: it introduces a new mandatory-finding rule. The change expands review coverage by closing a governance gap. It does not relax, remove, or weaken any existing check. This PR is self-referential — the new rule would flag this very PR, which is the correct and intended behavior.

  • [design-coherence] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The proposed rule aligns with established governance principles documented in governance.md and security-threat-model.md. The rule follows the existing pattern of the "Permission manifest changes" mandatory-finding rule.

  • [scope-authorization] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The PR correctly traces to issue code-review skill: mandatory finding when diff modifies review agent behavior files #1309. The implementation matches the issue description: covers four file patterns, uses info/medium severity as proposed, and addresses the governance gap identified in the issue. Scope is appropriate and authorized.

Previous run (5)

Review

Findings

Low

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — The new "Agent behavior definition changes" rule does not specify a finding category name. The routing table in step 3a of pr-review/SKILL.md enumerates recognized categories per dimension; an ad-hoc category string from this rule would fall through to the "correctness" dimension as a fallback. The security sub-agent's "Own" section also does not list agent behavior definition files, though the rule lives in the Security section of SKILL.md, which partially mitigates the routing ambiguity for first reviews. The concern is narrow: it only affects re-review severity anchoring when prior findings from this rule exist.

  • [formatting-consistency] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:152 — Uses **Medium** with uppercase "M". Existing severity references in the same file use lowercase: **high** (line 137), **medium** (lines 261, 263), **info** (line 266). Should be **medium** for consistency.

Info

  • [agent-behavior-definition] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — This diff modifies a skill definition file that controls how the review agent evaluates changes. The modification is additive: it introduces a new mandatory-finding rule. The change expands review coverage by closing a governance gap. It does not relax, remove, or weaken any existing check. This PR is self-referential — the new rule would flag this very PR, which is the correct and intended behavior.

  • [design-coherence] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The proposed rule aligns with established governance principles documented in governance.md and security-threat-model.md. The rule follows the existing pattern of the "Permission manifest changes" mandatory-finding rule.

  • [scope-authorization] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The PR correctly traces to issue code-review skill: mandatory finding when diff modifies review agent behavior files #1309. The implementation matches the issue description: covers four file patterns, uses info/medium severity as proposed, and addresses the governance gap identified in the issue. Scope is appropriate and authorized.

Previous run (6)

Review

Findings

Low

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — The new "Agent behavior definition changes" rule does not specify an explicit category name for findings. The existing "Permission manifest changes" rule also omits inline categories (its categories are defined in sub-agents/security.md), so this follows the existing pattern. However, without corresponding categories in the security sub-agent definition, the pr-review routing table will fall back to the correctness dimension for re-review severity anchoring. Consider adding category directives (e.g., agent-behavior-modification) to sub-agents/security.md and the routing table.

  • [logic-error] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — The security sub-agent's "Own" section does not explicitly list agent behavior definition files. The sub-agent receives the Security section of SKILL.md as context (which contains the mandatory-finding directive), so it will likely follow the rule regardless. Adding agent behavior files to the sub-agent's "Own" section would improve clarity and consistency.

  • [formatting-consistency] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:150 — Uses **Medium** with uppercase "M". The canonical severity list and existing rules use all lowercase (**high**, **medium**). Should be **medium** for consistency.

Info

  • [agent-behavior-definition] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md:143 — This diff modifies a skill definition file that controls how the review agent evaluates changes. The modification is additive: it introduces a new mandatory-finding rule for agent behavior definition files. The change expands review coverage and does not relax or weaken any existing check. This PR is self-referential — the new rule would flag this very PR, which is the correct and intended behavior.

  • [design-coherence] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The proposed rule aligns with established governance principles (no agent self-modification) documented in governance.md and security-threat-model.md.

  • [scope-authorization] internal/scaffold/fullsend-repo/skills/code-review/SKILL.md — The PR correctly traces to issue code-review skill: mandatory finding when diff modifies review agent behavior files #1309. The implementation matches the issue description. Scope is appropriate and authorized.

Comment thread internal/scaffold/fullsend-repo/skills/code-review/SKILL.md
Examples of permission-declaring files: GitHub App manifest JSON,
`permissions:` blocks in `.github/workflows/*.yml`, token scoping
maps, IAM policy JSON/YAML, Kubernetes `Role`/`ClusterRole` YAML.
- **Agent behavior definition changes:** If the diff modifies any file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] logic-error

The security sub-agent Own section does not explicitly list agent behavior definition files. Adding them would improve clarity and consistency with the mandatory-finding directive in SKILL.md.

Comment thread internal/scaffold/fullsend-repo/skills/code-review/SKILL.md
@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Jun 10, 2026
@ben-alkov
ben-alkov force-pushed the agent/1309-agent-behavior-review-rule branch from d29ca18 to 2506234 Compare June 15, 2026 18:17
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@ben-alkov

Copy link
Copy Markdown
Member

/fs-fix

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 15, 2026

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 6:22 PM UTC · Ended 6:32 PM UTC
Commit: 4e21a60 · View workflow run →

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 6:22 PM UTC · Completed 6:29 PM UTC
Commit: 4e21a60 · View workflow run →

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

No fixes applied. The bot approved with no findings, the human provided no specific instruction, and the code correctly implements issue #1309 requirements. All CI checks pass.

Disagreed (1):

  1. no actionable review findings or human instruction to address: The review agent approved this PR with zero findings. The human triggered /fs-fix without a specific instruction (HUMAN_INSTRUCTION='none'). All CI checks pass. The code change correctly adds the 'Agent behavior definition changes' rule to the Security dimension in internal/scaffold/fullsend-repo/skills/code-review/SKILL.md, adjacent to the permission manifest rule, matching the requirements in issue code-review skill: mandatory finding when diff modifies review agent behavior files #1309. The file is hard-linked to skills/code-review/SKILL.md so the rule applies to both the fullsend repo's own review agent and scaffolded customer repos. No code changes are needed.

Tests: passed

Updated by fullsend fix agent

Comment on lines +148 to +150
modifications warrant careful human review because agents have a
structural blind spot when evaluating changes to their own
instructions. Severity: **info** for additive changes (new rules, new

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.

Why is there a structural blindspot here?

Comment thread internal/scaffold/fullsend-repo/skills/code-review/SKILL.md
Comment thread internal/scaffold/fullsend-repo/skills/code-review/SKILL.md
Comment thread internal/scaffold/fullsend-repo/skills/code-review/SKILL.md
@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge and removed ready-for-merge All reviewers approved — ready to merge labels Jun 15, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:22 PM UTC · Completed 6:32 PM UTC
Commit: 2506234 · View workflow run →

@ben-alkov

Copy link
Copy Markdown
Member

/fs-fix Take care of the "low" findings

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 8:00 PM UTC · Completed 8:06 PM UTC
Commit: 4e21a60 · View workflow run →

@ralphbean

Copy link
Copy Markdown
Member

I'm wondering if these file patterns are too specific to fullsend-developing-fullsend. Another team using fullsend might not have harness/*.yaml or policies/*.yaml at all, but might have other files they'd want the review agent to flag — maybe their own config format, or a different directory layout.

Should these patterns be configurable? Something like a RISKY_FILES environment variable (or a repo-level config) that lets each team declare which file paths warrant a mandatory finding. The current hardcoded list would be the default, but teams could override it.

If we went that way, the rule in SKILL.md would say "check RISKY_FILES for the list of patterns" instead of enumerating them inline.

@ralphbean

Copy link
Copy Markdown
Member

Following up on the configurability question — what's the relationship between this list and the "protected paths" list in pr-review? From a user's perspective, are these two separate lists that produce different behavior, or are they essentially the same thing?

If they do the same thing (flag files for human attention), we might be asking users to maintain two lists that serve one purpose. If they're meaningfully different, we should be explicit about how — otherwise it'll be confusing to configure.

@ralphbean

Copy link
Copy Markdown
Member

Put another way: the small version of this might just be adding these patterns to the existing protected paths list — no new rule needed. The large version might be making the protected paths list itself configurable, so we aren't hardcoding paths that only matter for fullsend-developing-fullsend.

fullsend-ai-coder Bot added a commit that referenced this pull request Jun 15, 2026
Add explicit finding category `agent-behavior-definition` to the agent
behavior definition changes rule so the pr-review routing table can
correctly route and anchor these findings to the security dimension.

Fix formatting consistency: **Medium** → **medium** to match the
canonical lowercase severity convention used elsewhere in SKILL.md.

Addresses review feedback on #2133
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

Addressed both low review findings: added explicit finding category agent-behavior-definition to the agent behavior definition rule and fixed Medium to medium for formatting consistency.

Fixed (2):

  1. missing finding category name for agent behavior definition rule (internal/scaffold/fullsend-repo/skills/code-review/SKILL.md): Added explicit category agent-behavior-definition inline in the rule text so the pr-review routing table can correctly route and anchor these findings to the security dimension, avoiding fallback to correctness.
  2. formatting inconsistency: Medium should be medium (internal/scaffold/fullsend-repo/skills/code-review/SKILL.md): Changed Medium to medium to match the canonical lowercase severity convention used elsewhere in SKILL.md (e.g., high on line 137, medium on lines 261/263, info on line 266).

Tests: passed

Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:10 PM UTC · Completed 8:21 PM UTC
Commit: 8199032 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed ready-for-merge All reviewers approved — ready to merge labels Jun 15, 2026
ben-alkov pushed a commit that referenced this pull request Jun 24, 2026
Add explicit finding category `agent-behavior-definition` to the agent
behavior definition changes rule so the pr-review routing table can
correctly route and anchor these findings to the security dimension.

Fix formatting consistency: **Medium** → **medium** to match the
canonical lowercase severity convention used elsewhere in SKILL.md.

Addresses review feedback on #2133
@ben-alkov
ben-alkov force-pushed the agent/1309-agent-behavior-review-rule branch from 44f9eb3 to 447dba2 Compare June 24, 2026 12:45
@fullsend-ai-review

fullsend-ai-review Bot commented Jun 24, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:48 PM UTC · Completed 12:58 PM UTC
Commit: 447dba2 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

@@ -146,6 +146,17 @@ dimension carry over to another — each requires its own scrutiny.
Examples of permission-declaring files: GitHub App manifest JSON,
`permissions:` blocks in `.github/workflows/*.yml`, token scoping
maps, IAM policy JSON/YAML, Kubernetes `Role`/`ClusterRole` YAML.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[medium] logic-error

The new rule introduces category agent-behavior-definition, but this category is absent from the pr-review routing table (step 3a in skills/pr-review/SKILL.md). The fallback rule routes unrecognized categories to the nearest matching dimension by keyword, or to correctness as a fallback. Since agent-behavior-definition does not keyword-match any dimension name, prior findings with this category will be misrouted to correctness during re-reviews instead of security. Additionally, the security sub-agent definition (sub-agents/security.md) does not receive code-review/SKILL.md content during pr-review orchestration — sub-agents receive only their own definition file, the meta-prompt, and the context package. Therefore, the security sub-agent will not see the mandatory-finding rule during pr-review orchestration and will not produce agent-behavior-definition findings. The rule works correctly when code-review is invoked standalone, but during pr-review orchestration there are two gaps: (1) the security sub-agent lacks instructions to produce agent-behavior-definition findings, and (2) prior findings with this category will route to correctness instead of security.

Suggested fix: Add agent-behavior-definition to the security row in the pr-review routing table at skills/pr-review/SKILL.md. Also add agent behavior definition file coverage to the security sub-agent's Own section in sub-agents/security.md.

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.

/fs-fix

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 24, 2026
ben-alkov pushed a commit that referenced this pull request Jun 24, 2026
Add explicit finding category `agent-behavior-definition` to the agent
behavior definition changes rule so the pr-review routing table can
correctly route and anchor these findings to the security dimension.

Fix formatting consistency: **Medium** → **medium** to match the
canonical lowercase severity convention used elsewhere in SKILL.md.

Addresses review feedback on #2133
@ben-alkov
ben-alkov force-pushed the agent/1309-agent-behavior-review-rule branch from 447dba2 to 7aad081 Compare June 24, 2026 19:47
Add a new Platform Security rule to the code-review skill that
instructs the review agent to always produce a finding when a diff
modifies files that define agent behavior. This closes a governance
gap where the review agent could silently approve changes to its own
skill definitions, agent definitions, harness configs, or policy
files without flagging them for human review.

The rule covers four file patterns: skills/*/SKILL.md, agents/*.md,
harness/*.yaml, and policies/*.yaml. Severity is info for additive
changes and medium for modifications that relax existing checks or
remove constraints.

Note: make lint could not run due to Go module cache permission
errors in the sandbox (infrastructure issue, not code-related).
This is a Markdown-only change with no Go code modifications.

Closes #1309
Add explicit finding category `agent-behavior-definition` to the agent
behavior definition changes rule so the pr-review routing table can
correctly route and anchor these findings to the security dimension.

Fix formatting consistency: **Medium** → **medium** to match the
canonical lowercase severity convention used elsewhere in SKILL.md.

Addresses review feedback on #2133
@ben-alkov
ben-alkov force-pushed the agent/1309-agent-behavior-review-rule branch from 7aad081 to 07cd5f0 Compare June 29, 2026 19:10
@ben-alkov

Copy link
Copy Markdown
Member

/fs-fix

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 8:12 PM UTC · Completed 8:17 PM UTC
Commit: 104508d · View workflow run →

Add `agent-behavior-definition` to the security row in the pr-review
routing table so findings with this category are routed to the security
sub-agent during re-reviews instead of falling back to correctness.

Add agent behavior definition file coverage to the security sub-agent's
Own section so it knows to produce these findings during pr-review
orchestration.

Addresses review feedback on #2133
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (human-triggered)

Addressed both parts of the medium-severity logic-error finding: (1) added agent-behavior-definition to the security routing table in pr-review/SKILL.md, and (2) added agent behavior definition file coverage to the security sub-agent's Own section in sub-agents/security.md. This closes both gaps identified by the reviewer.

Fixed (2):

  1. agent-behavior-definition category missing from pr-review routing table (internal/scaffold/fullsend-repo/skills/pr-review/SKILL.md): Added agent-behavior-definition to the security row in the routing table (step 3a) so findings with this category route to the security sub-agent during re-reviews instead of falling back to correctness.
  2. security sub-agent lacks agent behavior definition file coverage (internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/security.md): Added agent behavior definition changes (skill definitions, agent definitions, harness configs, policy files) to the security sub-agent's Own section so it knows to produce agent-behavior-definition findings during pr-review orchestration.

Tests: passed

Updated by fullsend fix agent

@ralphbean ralphbean left a comment

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.

This is an automated comment. We are moving agent content from internal/scaffold/fullsend-repo/ to https://github.com/fullsend-ai/agents -- changes should be made to agent definitions there going forwards.

@ben-alkov

Copy link
Copy Markdown
Member

Will move to agents repo

@ben-alkov

Copy link
Copy Markdown
Member

Superseded by fullsend-ai/agents#445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/review Review agent component/harness Agent harness, config, and skills loading requires-manual-review Review requires human judgment security Security threat model and related concerns

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

code-review skill: mandatory finding when diff modifies review agent behavior files

2 participants