Skip to content

feat(agent-templates): add codebase-check-before-blocking rule to base templates - #11083

Open
trac3r726 wants to merge 1 commit into
paperclipai:masterfrom
trac3r726:feat/codebase-check-before-blocking-SSC-2301
Open

feat(agent-templates): add codebase-check-before-blocking rule to base templates#11083
trac3r726 wants to merge 1 commit into
paperclipai:masterfrom
trac3r726:feat/codebase-check-before-blocking-SSC-2301

Conversation

@trac3r726

Copy link
Copy Markdown

Summary

Adds the codebase-check-before-blocking rule to the base agent template and all role templates.

Root cause evidence (SSC-1468): C5 Delivery Lead declared blocked due to missing Stampli/SN access. The feature was already fully built in smst_client.py, migrations 115+123, runbook, and tests. The agent never checked GitHub before blocking.

Rule added (verbatim in templates)

Before declaring a blocker for missing functionality or credentials: check the project codebase first. Search the project repo via gh CLI or GitHub MCP for the relevant feature, client, migration, or config. Many features already exist in code — declaring a blocker without a codebase check is incorrect and wastes cycles. Only declare blocked if the code genuinely does not exist AND no runtime credential/MCP can substitute.

Files changed

  • server/src/onboarding-assets/default/AGENTS.md — base onboarding template every new agent starts from
  • skills/paperclip-create-agent/references/agents/coder.md — Coder role template
  • skills/paperclip-create-agent/references/agents/qa.md — QA role template
  • skills/paperclip-create-agent/references/agents/securityengineer.md — SecurityEngineer role template
  • skills/paperclip-create-agent/references/agents/uxdesigner.md — UXDesigner role template
  • skills/paperclip-create-agent/references/baseline-role-guide.md — fallback guide for new role creation

Blast radius

Templates only. No live agent AGENTS.md files are modified. New agents hired from these templates will inherit the rule automatically. Existing agents already have their own AGENTS.md and are not changed by this PR (fleet-wide rollout is a separate decision requiring board approval per Hermes agent ops mandate).

Closes SSC-2301.

Before declaring a blocker for missing functionality or credentials,
agents must search the project repo via gh CLI or GitHub MCP first.
Many features already exist in code -- a blocker without a codebase
check is incorrect and wastes cycles.

The rule is added to:
- server/src/onboarding-assets/default/AGENTS.md (base onboarding template)
- skills/paperclip-create-agent/references/agents/coder.md
- skills/paperclip-create-agent/references/agents/qa.md
- skills/paperclip-create-agent/references/agents/securityengineer.md
- skills/paperclip-create-agent/references/agents/uxdesigner.md
- skills/paperclip-create-agent/references/baseline-role-guide.md

Evidence: SSC-1468 -- C5 Delivery Lead declared blocked on missing
Stampli access. Feature was already fully built in smst_client.py,
migrations 115+123, runbook, and tests. Agent never checked.
Tracked in SSC-2301.
Copilot AI lite review requested due to automatic review settings August 8, 2026 03:16
@commitperclip

commitperclip Bot commented Aug 8, 2026

Copy link
Copy Markdown

Hey @trac3r726! Before this PR can be reviewed, a few things need attention:

Missing or incomplete:

  • Missing section: ## Thinking Path
  • Missing section: ## What Changed
  • Missing section: ## Verification
  • Missing section: ## Risks
  • Missing section: ## Model Used
  • No linked issue or inline issue description found — either tag an existing issue with Fixes #NNN / Closes #NNN / Refs #NNN, or describe the underlying issue inline in the PR body following one of our issue templates (https://github.com/paperclipai/paperclip/tree/master/.github/ISSUE_TEMPLATE). See CONTRIBUTING.md → "Link Issues or Describe Them In-PR".
  • Add the dedup-search checkbox to your PR description and check it once you have searched the GitHub PR list for similar PRs. See the PR template at .github/PULL_REQUEST_TEMPLATE.md and CONTRIBUTING.md → "Before You Start: Search First".
  • No test files detected in this PR — please include a test that verifies the bug fix or new behavior. If this PR genuinely doesn't need a test (e.g. a refactor), please retitle with refactor: prefix.

Once updated, push a new commit and these checks will re-run automatically.

— commitperclip

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a mandatory project-codebase search before agents declare blockers for missing functionality or credentials.

  • Updates the default onboarding instructions.
  • Adds the policy to the Coder, QA, Security Engineer, and UX Designer templates.
  • Adds the verbatim policy to the fallback role-creation guide.

Confidence Score: 4/5

The template changes appear safe to merge, but the PR description should first be completed with the repository-required planning, verification, risks, and model details.

The changed Markdown consistently adds the intended blocker-prevention policy and does not alter runtime behavior; the remaining concern is the incomplete PR description.

Important Files Changed

Filename Overview
server/src/onboarding-assets/default/AGENTS.md Adds the blocker-prevention rule to the default onboarding instructions without changing runtime code.
skills/paperclip-create-agent/references/agents/coder.md Adds the full codebase-check policy to the Coder template.
skills/paperclip-create-agent/references/agents/qa.md Adds the full codebase-check policy to the QA template.
skills/paperclip-create-agent/references/agents/securityengineer.md Adds a semantically equivalent concise form of the policy to the Security Engineer template.
skills/paperclip-create-agent/references/agents/uxdesigner.md Adds a semantically equivalent concise form of the policy to the UX Designer template.
skills/paperclip-create-agent/references/baseline-role-guide.md Requires fallback roles capable of declaring blockers to include the new policy verbatim.
Prompt To Fix All With AI
### Issue 1
server/src/onboarding-assets/default/AGENTS.md:11
**Complete the required PR description**

The description omits the required Thinking Path, Verification, Risks, Model Used, and Checklist sections, so reviewers cannot assess how the template change was verified or which risks were considered. Please update the description to follow the PR template and include these details.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(agent-templates): add codebase-chec..." | Re-trigger Greptile

- When your work produces a user-inspectable deliverable file, follow the Paperclip skill's "Generated Artifacts and Work Products" workflow before final disposition. Use `skills/paperclip/scripts/paperclip-upload-artifact.sh` when working in this repo, create/update an artifact work product when the file is the deliverable, and link the uploaded attachment in the final comment. Do not rely on local filesystem paths as the only access path. If an important file intentionally remains workspace-only, create/update a work product with `metadata.resourceRef.kind: "workspace_file"` and a workspace-relative path, then name that work product and path in the final comment. Treat browse/search as a fallback for recovering workspace files, not the preferred deliverable path.
- When your work produces or updates an operator-facing engineering output, create/update the matching work product: `pull_request` for opened PRs, `preview_url` for published previews, `runtime_service` for managed preview/dev services, `commit` for notable pushed commits, and `branch` when the branch itself is the handoff. A comment is not a substitute for the work product access path.
- Comments, documents, screenshots, work products, and `Remaining` bullets are evidence, not valid liveness paths by themselves.
- **Before declaring a blocker for missing functionality or credentials: check the project codebase first.** Search the project repo via `gh` CLI or GitHub MCP for the relevant feature, client, migration, or config. Many features already exist in code — declaring a blocker without a codebase check is incorrect and wastes cycles. Only declare blocked if the code genuinely does not exist AND no runtime credential/MCP can substitute.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Complete the required PR description

The description omits the required Thinking Path, Verification, Risks, Model Used, and Checklist sections, so reviewers cannot assess how the template change was verified or which risks were considered. Please update the description to follow the PR template and include these details.

Context Used: CONTRIBUTING.md has a guide for a good PR message ... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: server/src/onboarding-assets/default/AGENTS.md
Line: 11

Comment:
**Complete the required PR description**

The description omits the required Thinking Path, Verification, Risks, Model Used, and Checklist sections, so reviewers cannot assess how the template change was verified or which risks were considered. Please update the description to follow the PR template and include these details.

**Context Used:** CONTRIBUTING.md has a guide for a good PR message ... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants