Skip to content

feat(#4129): add AiResourceAgentProcessor for agent field validation - #4246

Merged
johnmcollier merged 7 commits into
mainfrom
agent/4129-agent-processor-validation
Aug 13, 2026
Merged

feat(#4129): add AiResourceAgentProcessor for agent field validation#4246
johnmcollier merged 7 commits into
mainfrom
agent/4129-agent-processor-validation

Conversation

@fullsend-ai-coder

@fullsend-ai-coder fullsend-ai-coder Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Add AiResourceAgentProcessor in catalog-backend-module-ai-resource-agent to validate agent-specific fields when spec.type is agent, following the same packaging approach as #4128 / #4164 (dedicated agent model + backend module for kind: AiResource).

What changed

  • Register AiResourceAgentProcessor alongside the agent catalog model source
  • Validate required non-empty spec.instructions and optional agent field shapes (handoffs, tools, resetToolChoice, modelSettings, toolUseBehavior, outputSchema, handoffDescription, model)
  • Accept opaque handoffs / tools string arrays without entity-ref format enforcement
  • Leave AIResourceExtensionsProcessor focused on shared RHDH extensions (spec.scope, OCI source-location) — no agent field rules there
  • Update OpenSpec (airesource-agent-typed-schema) so design/tasks/proposal match this architecture

Packaging note

Agent typing stays in the agent packages rather than a single shared “AI experience” extensions processor. That split is intentional.

Closes #4129

…essor

Extend AIResourceExtensionsProcessor to validate agent-specific fields
when spec.type is 'agent'. Add collectAgentErrors helper (following the
collectOciErrors pattern) that checks:

- spec.instructions: required, non-empty string
- spec.handoffs / spec.tools: must be arrays if present (opaque strings
  accepted without entity-ref format enforcement)
- spec.resetToolChoice: must be boolean if present
- spec.modelSettings: must be plain object if present
- spec.toolUseBehavior: must be string or string array if present
- spec.outputSchema: must be string or object if present
- spec.handoffDescription / spec.model: must be strings if present

All errors are collected and reported together. Non-agent AiResource
entities (skill, rule, model) are unaffected. Error messages name the
field path and problem without exposing internal class names.

Closes #4129
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Agent PR ready for human review label Aug 10, 2026
@rhdh-gh-app

rhdh-gh-app Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-agent workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent minor v0.2.1
@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-extensions workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions minor v0.4.0
@red-hat-developer-hub/backstage-plugin-catalog-model-ai-resource-agent workspaces/ai-integrations/plugins/catalog-model-ai-resource-agent minor v0.2.0

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.58824% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.61%. Comparing base (8263303) to head (467e272).
⚠️ Report is 18 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4246      +/-   ##
==========================================
+ Coverage   59.59%   59.61%   +0.02%     
==========================================
  Files        2458     2460       +2     
  Lines       98268    98330      +62     
  Branches    27444    27475      +31     
==========================================
+ Hits        58559    58620      +61     
- Misses      38074    38075       +1     
  Partials     1635     1635              
Flag Coverage Δ *Carryforward flag
adoption-insights 84.55% <ø> (ø) Carriedforward from ea6fea6
ai-integrations 71.04% <95.58%> (+2.75%) ⬆️
app-defaults 69.79% <ø> (ø) Carriedforward from ea6fea6
augment 46.67% <ø> (ø) Carriedforward from ea6fea6
boost 77.63% <ø> (ø) Carriedforward from ea6fea6
bulk-import 72.79% <ø> (ø) Carriedforward from ea6fea6
cost-management 13.55% <ø> (ø) Carriedforward from ea6fea6
dcm 67.21% <ø> (ø) Carriedforward from ea6fea6
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from ea6fea6
e2e-extensions 62.13% <ø> (ø) Carriedforward from ea6fea6
e2e-intelligent-assistant 46.74% <ø> (ø) Carriedforward from ea6fea6
extensions 56.59% <ø> (ø) Carriedforward from ea6fea6
global-floating-action-button 71.18% <ø> (ø) Carriedforward from ea6fea6
global-header 66.50% <ø> (ø) Carriedforward from ea6fea6
homepage 47.50% <ø> (ø) Carriedforward from ea6fea6
install-dynamic-plugins 59.95% <ø> (ø) Carriedforward from ea6fea6
intelligent-assistant 75.42% <ø> (ø) Carriedforward from ea6fea6
konflux 91.98% <ø> (ø) Carriedforward from ea6fea6
lightspeed 69.02% <ø> (ø) Carriedforward from ea6fea6
mcp-integrations 83.40% <ø> (ø) Carriedforward from ea6fea6
orchestrator 71.31% <ø> (ø) Carriedforward from ea6fea6
quickstart 63.74% <ø> (ø) Carriedforward from ea6fea6
sandbox 79.56% <ø> (ø) Carriedforward from ea6fea6
scorecard 86.25% <ø> (ø) Carriedforward from ea6fea6
theme 88.14% <ø> (ø) Carriedforward from ea6fea6
translations 5.12% <ø> (ø) Carriedforward from ea6fea6
x2a 79.20% <ø> (ø) Carriedforward from ea6fea6

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8263303...467e272. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@johnmcollier johnmcollier 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.

Request changes

Agent field validation landed in the wrong place relative to #4128 / #4164. Please rework this PR rather than polishing the current AIResourceExtensionsProcessor approach.

1) Follow the previous PR’s packaging approach

#4128 put agent typing in dedicated packages:

  • catalog-model-ai-resource-agent (types / JSON schema / KindValidator)
  • catalog-backend-module-ai-resource-agent (catalog model registration for kind: AiResource)

Do not extend AIResourceExtensionsProcessor with agent-specific field rules. That processor should stay focused on shared RHDH extensions (spec.scope, OCI source-location).

If RHIDP-15868 still needs catalog-processor coverage beyond the existing agent KindValidator, put it in the agent backend module (matching AiResource), not in catalog-backend-module-ai-resource-extensions.

Also align kind casing with #4128 (AiResource), not AIResource.

2) Update OpenSpec to match that architecture

The current OpenSpec steered this PR incorrectly (notably D10 / tasks §5 / proposal “extend the AiResource extensions processor path”). Update the OpenSpec change materials under workspaces/ai-integrations/openspec/changes/airesource-agent-typed-schema/ so they reflect:

  • Agent schema + agent ingestion validation live with the agent packages / module
  • AIResourceExtensionsProcessor remains scope/OCI only
  • Kind spelling AiResource consistent with examples and the agent model

Please amend design.md, tasks.md, proposal.md, and the ai-resource-agent-ingestion spec as needed so the next coding pass cannot re-learn the wrong home.

Out of scope for this fix round

Fullsend workflow/skill changes for OpenSpec drift feedback loops — track separately.

@johnmcollier

Copy link
Copy Markdown
Member

/fs-fix

@fullsend-ai-coder

fullsend-ai-coder Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 8:28 PM UTC · Completed 8:46 PM UTC

Commit: 8ab4eee · View workflow run →

Move collectAgentErrors and agent field validation out of
AIResourceExtensionsProcessor into catalog-backend-module-ai-resource-agent
as AiResourceAgentProcessor, matching the packaging approach from #4128.

- Remove agent-specific code from AIResourceExtensionsProcessor (scope/OCI only)
- Add AiResourceAgentProcessor to catalog-backend-module-ai-resource-agent
- Register processor alongside model source in the agent backend module
- Update OpenSpec design.md, tasks.md, proposal.md to reflect architecture
- Align kind casing with AiResource (matching #4128)

Addresses review feedback on #4246

Assisted-by: Claude Code
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

Addressed all 4 review findings. Moved agent field validation from AIResourceExtensionsProcessor to a new AiResourceAgentProcessor in catalog-backend-module-ai-resource-agent. Updated OpenSpec documents (design.md, tasks.md, proposal.md) to reflect the correct architecture. All tests pass (102 tests across both packages).

Fixed (4):

  1. Follow the previous PR's packaging approach — move agent validation to agent backend module (workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/AiResourceAgentProcessor.ts): Moved collectAgentErrors and agent field validation out of AIResourceExtensionsProcessor into catalog-backend-module-ai-resource-agent as AiResourceAgentProcessor. The extensions processor now only handles scope and OCI validation.
  2. Do not extend AIResourceExtensionsProcessor with agent-specific field rules (workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/src/AIResourceExtensionsProcessor.ts): Removed collectAgentErrors import, usage, and agent-specific JSDoc from AIResourceExtensionsProcessor. Deleted collectAgentErrors.ts and collectAgentErrors.test.ts from the extensions package. Removed agent test block from processor integration tests.
  3. Align kind casing with ai-integrations: AiResource agent typed schema (catalog-model validator + examples) #4128 (AiResource, not AIResource) (workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/AiResourceAgentProcessor.ts): New AiResourceAgentProcessor uses AiResource kind casing consistent with ai-integrations: AiResource agent typed schema (catalog-model validator + examples) #4128 and the agent model packages. The processor checks entity.kind === 'AiResource'.
  4. Update OpenSpec to match that architecture (workspaces/ai-integrations/openspec/changes/airesource-agent-typed-schema/design.md): Updated D5 and D10 in design.md, task 5 in tasks.md, and proposal.md to reflect that agent validation lives in catalog-backend-module-ai-resource-agent as AiResourceAgentProcessor, not in AIResourceExtensionsProcessor. Clarified kind spelling is AiResource.

Tests: passed

Decision points
  • Chose to create AiResourceAgentProcessor as a CatalogProcessor registered alongside the model source in the same backend module (alternatives: Extend the existing KindValidator with runtime checks, Create a separate backend module for the processor; rationale: Matches the existing module pattern — the agent backend module already registers the model source, so co-locating the processor keeps all agent-specific catalog behavior in one module)

Updated by fullsend fix agent

@johnmcollier

Copy link
Copy Markdown
Member

/fs-review

1 similar comment
@johnmcollier

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 11, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:53 PM UTC · Completed 10:10 PM UTC

Commit: bdc0eb9 · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [naming-coherence] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/AiResourceAgentProcessor.ts:53 — The new processor checks entity.kind !== 'AiResource' while AIResourceExtensionsProcessor checks entity.kind !== 'AIResource'. The two processors fire on different kind spellings, meaning scope/OCI validation from the extensions processor will not apply to agent entities using 'AiResource'. This is not necessarily a bug if the kinds are genuinely registered separately, but deserves explicit documentation.

  • [scope-deviation] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/AiResourceAgentProcessor.ts — Issue ai-integrations: catalog processor validation for AiResource agent type #4129 prefers extending the existing extensions processor. This PR creates a separate AiResourceAgentProcessor instead. The issue's parenthetical "(or equivalent registered processor path)" partially authorizes this, and the AIResource/AiResource kind-spelling mismatch provides a genuine technical justification. The PR description should document this constraint explicitly.
    Remediation: Add a note to the PR description explaining the kind-spelling difference prevents extending the extensions processor.

Low

  • [self-authorization] workspaces/ai-integrations/openspec/changes/airesource-agent-typed-schema/design.md — The PR modifies OpenSpec design docs (D5, D10), proposal.md, and tasks.md alongside the implementation. While the changes are accurate, self-modifying design docs in the implementation PR should be noted transparently.
    Remediation: Note in the PR description that OpenSpec documents were updated to reflect the separate-processor approach.

  • [edge-case] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/collectAgentErrors.ts:35spec.instructions validation accepts whitespace-only strings because it checks === '' without trimming. The design doc (D3) says "Non-empty string only."
    Remediation: Consider adding .trim() before the empty-string check.

  • [stale-doc] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/module.ts:28 — JSDoc on catalogModuleAiResourceAgent says "Registers the agent specType" but does not mention the new processor registration.
    Remediation: Update JSDoc to mention both responsibilities.

Previous run

Review

Findings

Medium

  • [scope-deviation] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/AiResourceAgentProcessor.ts — Issue ai-integrations: catalog processor validation for AiResource agent type #4129 says "Prefer extending the existing ... extensions processor ... rather than inventing a parallel validation path." The PR instead creates a separate AiResourceAgentProcessor. The parenthetical "or equivalent registered processor path" in the issue's first task partially authorizes alternatives, and the kind spelling difference ('AIResource' vs 'AiResource') provides genuine technical justification — extending AIResourceExtensionsProcessor would require changing its kind check, potentially breaking existing scope/OCI validation. Consider calling out this architectural deviation in the PR description and getting maintainer acknowledgment.

  • [misleading-title] — The PR title says "add agent field validation to AIResource extensions processor" but the PR does NOT modify AIResourceExtensionsProcessor. It creates an entirely separate AiResourceAgentProcessor in catalog-backend-module-ai-resource-agent. Consider updating the title to accurately reflect the change, e.g., "feat(ai-integrations: catalog processor validation for AiResource agent type #4129): add AiResourceAgentProcessor for agent field validation."

  • [missing-documentation] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/README.md — The package now exports a new public class AiResourceAgentProcessor but has no README. The sibling package catalog-backend-module-ai-resource-extensions has a comprehensive README documenting its processor, validated fields, and registration instructions. Consider adding a README following that pattern.

Low

  • [self-authorization] workspaces/ai-integrations/openspec/changes/airesource-agent-typed-schema/design.md — The design doc (D5, D10), proposal.md, and tasks.md are modified in this PR to justify the separate-processor approach. While the changes are visible in the diff and reflect a genuine technical constraint (kind spelling), calling them out in the PR description would improve reviewability.

  • [edge-case] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/collectAgentErrors.ts — Whitespace-only spec.instructions (e.g., ' ') passes validation since the check uses instructions === ''. The JSON schema also does not reject whitespace, so this is consistent — but a whitespace-only system prompt is functionally empty.

  • [validation-gap] workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/collectAgentErrors.tshandoffs and tools validators check Array.isArray() but do not verify elements are strings. This is consistent with the design intent (processor validates structural shape; schema handles element types) and the issue requirement to "accept opaque string[] without entity-ref format enforcement."

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Aug 11, 2026

@johnmcollier johnmcollier 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.

Second review pass

Architecture move looks right: agent field validation now lives in catalog-backend-module-ai-resource-agent as AiResourceAgentProcessor (alongside the agent model), and AIResourceExtensionsProcessor stays scope/OCI-only. That packaging split is intentional — not a problem to reverse.

Please address the remaining actionable items from the bot review (and stale PR metadata):

1) Update PR title

Current title still says “add agent field validation to AIResource extensions processor.” Update to something accurate, e.g.:
feat(#4129): add AiResourceAgentProcessor for agent field validation

2) Add package README

Add workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/README.md documenting:

  • what the module registers (agent catalog model + AiResourceAgentProcessor)
  • that it targets kind: AiResource / spec.type: agent
  • which agent fields are validated (mirror the processor JSDoc / sibling extensions README style)
  • that shared RHDH extensions (scope / OCI) remain in catalog-backend-module-ai-resource-extensions

3) Refresh PR description

Replace the body that still describes extending AIResourceExtensionsProcessor. Briefly note:

  • validation lives in the agent backend module (same packaging approach as #4128)
  • OpenSpec (airesource-agent-typed-schema) was updated to match
  • extensions processor is unchanged for agent fields

Do not change

  • Whitespace-only instructions / array element-type checks — leave as intentional schema/processor layering
  • Do not move validation back into AIResourceExtensionsProcessor

@johnmcollier
johnmcollier dismissed their stale review August 12, 2026 14:00

Addressing title/README/PR body directly instead of routing through fullsend.

@johnmcollier johnmcollier changed the title feat(#4129): add agent field validation to AIResource extensions processor feat(#4129): add AiResourceAgentProcessor for agent field validation Aug 12, 2026
johnmcollier and others added 2 commits August 12, 2026 10:00
Add package README for the agent backend module and a minor changeset for
the new ingestion processor. PR title/description updated separately.

Assisted-by: Cursor Grok 4.5
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve module.ts conflict by keeping main's CatalogModelSource
registration pattern and AiResourceAgentProcessor registration.

Co-authored-by: Cursor <cursoragent@cursor.com>
@johnmcollier

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 12, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:13 PM UTC · Completed 7:29 PM UTC

Commit: 1a669fc · 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.


Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/AiResourceAgentProcessor.ts:53: [medium] naming-coherence

The new processor checks entity.kind !== 'AiResource' while AIResourceExtensionsProcessor checks entity.kind !== 'AIResource'. The two processors within the same workspace fire on different kind spellings, meaning scope/OCI validation from the extensions processor will not apply to agent entities using 'AiResource'. This is not necessarily a bug if the kinds are genuinely registered separately, but deserves explicit documentation.

  • workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/collectAgentErrors.ts:35: [low] edge-case

spec.instructions validation accepts whitespace-only strings because it checks === '' without trimming. The design doc (D3) says 'Non-empty string only' and a whitespace-only instruction is functionally empty.

Suggested fix: Consider adding .trim() before the empty-string check.

  • workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent/src/module.ts (file-level): Line 28 · [low] stale-doc

JSDoc on catalogModuleAiResourceAgent says 'Registers the agent specType for the AiResource kind in the catalog' but the module now also registers AiResourceAgentProcessor for agent field validation. The JSDoc does not mention the processor registration.

Suggested fix: Update JSDoc to mention both responsibilities.

AIResource is not a valid catalog kind. Align extensions processor,
public exports, README, OpenSpec, and examples on AiResource only.

Assisted-by: Cursor Grok 4.5
Co-authored-by: Cursor <cursoragent@cursor.com>

@gabemontero gabemontero left a comment

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.

Aside from the in-line comment I have @johnmcollier here is a copy/paste of the report the openspec audit skill compiled for me when pointing it at your PR:

● Audit Report: airesource-agent-typed-schema

  Last audited: 2026-08-13T16:05:00Z

  Summary

  ┌──────────────────────────────────────┬──────────┬─────────┬────────────┐
  │               Category               │ CRITICAL │ WARNING │ SUGGESTION │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤                                                                                                                                                                                                                                                                                                                                                                     
  │ A Entity propagation                 │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ B Enum / vocabulary                  │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ C Semantic contradiction             │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ D Codebase & convention grounding    │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤                                                                                                                                                                                                                                                                                                                                                                     
  │ E Namespace & cross-change ownership │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ F Template / copy-paste residue      │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ G Extended coherence                 │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ H Security lint                      │ 0        │ 0       │ 0          │
  └──────────────────────────────────────┴──────────┴─────────┴────────────┘
  
  CRITICAL

  - None

  WARNING

  - None

  SUGGESTION

  - None

  ---
  Audit Report: ai-resource-catalog-entity-kind
  
  Last audited: 2026-08-13T16:05:00Z                                                                                                                                                                                                                                                                                                                                                                                                             

  Summary

  ┌──────────────────────────────────────┬──────────┬─────────┬────────────┐
  │               Category               │ CRITICAL │ WARNING │ SUGGESTION │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ A Entity propagation                 │ 0        │ 1       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ B Enum / vocabulary                  │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ C Semantic contradiction             │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ D Codebase & convention grounding    │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤                                                                                                                                                                                                                                                                                                                                                                     
  │ E Namespace & cross-change ownership │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ F Template / copy-paste residue      │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ G Extended coherence                 │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤                                                                                                                                                                                                                                                                                                                                                                     
  │ H Security lint                      │ 0        │ 0       │ 0          │
  └──────────────────────────────────────┴──────────┴─────────┴────────────┘

  CRITICAL
  
  - None


  ┌──────────────────────────────────────┬──────────┬─────────┬────────────┐
  │               Category               │ CRITICAL │ WARNING │ SUGGESTION │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ A Entity propagation                 │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ B Enum / vocabulary                  │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ C Semantic contradiction             │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ D Codebase & convention grounding    │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ E Namespace & cross-change ownership │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ F Template / copy-paste residue      │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ G Extended coherence                 │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ H Security lint                      │ 0        │ 0       │ 0          │
  └──────────────────────────────────────┴──────────┴─────────┴────────────┘

  CRITICAL

  - None

  WARNING

  - None

  SUGGESTION

  - None

  ---
  Audit Report: ai-resource-catalog-entity-kind

  Last audited: 2026-08-13T16:05:00Z

  Summary

  ┌──────────────────────────────────────┬──────────┬─────────┬────────────┐
  │               Category               │ CRITICAL │ WARNING │ SUGGESTION │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ A Entity propagation                 │ 0        │ 1       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ B Enum / vocabulary                  │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ C Semantic contradiction             │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ D Codebase & convention grounding    │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ E Namespace & cross-change ownership │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ F Template / copy-paste residue      │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ G Extended coherence                 │ 0        │ 0       │ 0          │
  ├──────────────────────────────────────┼──────────┼─────────┼────────────┤
  │ H Security lint                      │ 0        │ 0       │ 0          │
  └──────────────────────────────────────┴──────────┴─────────┴────────────┘

  CRITICAL

  - None

  WARNING

  - (A) workspaces/ai-integrations/openspec/changes/ai-resource-catalog-entity-kind/tasks.md — Tasks 2.1–2.4 reference AiResourceOciProcessor (4 occurrences), but the implementation and sibling change airesource-agent-typed-schema D5 use AiResourceExtensionsProcessor as the canonical processor name for scope/OCI validation. Open tasks 2.2 and 2.4 direct implementers to a class that no longer exists under that name. Recommendation: Rename AiResourceOciProcessor
  → AiResourceExtensionsProcessor in tasks 2.1–2.4, or add a parenthetical noting the rename. (autofixable)

  SUGGESTION

  - None

  ---
  Audit clean (no CRITICAL) — the one WARNING is a mechanical name drift in tasks.md that's autofixable. airesource-agent-typed-schema is fully consistent across all artifacts.

Agents may bake a default system prompt into the image/runtime, so
catalog authors should not be forced to invent a placeholder. Keep
type-checking when the field is present.

Assisted-by: Cursor Grok 4.5
Co-authored-by: Cursor <cursoragent@cursor.com>
@gabemontero

Copy link
Copy Markdown
Contributor

In case it got lost in the noise @johnmcollier from my earlier copy/past here was the sole bit from the openspec audit review:

WARNING

  • (A) workspaces/ai-integrations/openspec/changes/ai-resource-catalog-entity-kind/tasks.md — Tasks 2.1–2.4 reference AiResourceOciProcessor (4 occurrences), but the implementation and sibling change airesource-agent-typed-schema D5 use AiResourceExtensionsProcessor as the canonical processor name for scope/OCI validation. Open tasks 2.2 and 2.4 direct implementers to a class that no longer exists under that name. Recommendation: Rename AiResourceOciProcessor
    → AiResourceExtensionsProcessor in tasks 2.1–2.4, or add a parenthetical noting the rename. (autofixable)

WDYT?

…ssor

Rename stale AiResourceOciProcessor references in the catalog-entity-kind
OpenSpec tasks and mark the landed source-location retool work complete.

Assisted-by: Cursor Grok 4.5
Co-authored-by: Cursor <cursoragent@cursor.com>
@johnmcollier

Copy link
Copy Markdown
Member

D'oh missed that. Looks good, updated. Really nice to see it in action 👍

@sonarqubecloud

Copy link
Copy Markdown

@johnmcollier
johnmcollier merged commit 6ddfd98 into main Aug 13, 2026
27 checks passed
@fullsend-ai-retro

fullsend-ai-retro Bot commented Aug 13, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 11:29 PM UTC · Completed 11:45 PM UTC

Commit: 467e272 · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #4246 — AiResourceAgentProcessor for agent field validation

Workflow overview

PR #4246 was a bot-authored PR (by fullsend-ai-coder) implementing catalog processor validation for AiResource agent-type entities in the ai-integrations workspace. The workflow spanned 3 days from code generation to merge, involving the triage, code, fix, and review agents plus two human reviewers.

Timeline

  1. 2026-07-31: Issue #4129 created by johnmcollier. Triage agent correctly identified it as blocked on #4128.
  2. 2026-08-10 20:37: johnmcollier triggered /fs-code (run 31429953754). Code agent produced a working implementation in ~15 min but placed validation in the wrong module (AIResourceExtensionsProcessor) following the issue's stale guidance.
  3. 2026-08-11 16:22: johnmcollier reviewed (CHANGES_REQUESTED) — agent validation should live in catalog-backend-module-ai-resource-agent, not the extensions processor, per the pattern established by merged PRs ai-integrations: AiResource agent typed schema (catalog-model validator + examples) #4128/feat(#4128): add AiResource agent typed schema #4164.
  4. 2026-08-11 20:27: johnmcollier triggered /fs-fix (run 31533011872). Fix agent reworked the entire architecture in one iteration (~18 min), addressing all 4 review findings.
  5. 2026-08-11 21:52: johnmcollier triggered /fs-review (run 31539875732). Review agent posted 2 medium and 3 low findings.
  6. 2026-08-11 22:27: johnmcollier dismissed his prior review — architecture correct, minor items remain.
  7. 2026-08-12 19:12: Third /fs-review (run 31631512983).
  8. 2026-08-12 19:40: johnmcollier approved the PR.
  9. 2026-08-13 15:39: gabemontero identified from real-world kagenti testing that spec.instructions should be optional. johnmcollier made manual changes.
  10. 2026-08-13 23:28: PR merged. 38 files changed, +1255/-266, 95.59% patch coverage.

What went well

  • Fix agent performed excellently — reworked the entire architecture (moving validation from the extensions processor to a new AiResourceAgentProcessor in the agent backend module, renaming files, updating OpenSpec docs) in a single iteration with all 102 tests passing.
  • Code quality: The code agent produced well-tested, functional code despite the architecture mismatch. Test coverage was 95.59%.
  • Review agent naming-coherence finding was valid and useful — it caught inconsistent kind spelling (AiResource vs AIResource) between processors.

Evidence for existing tracked issues

No new proposals

All improvement opportunities from this workflow are already tracked in the issues above. The most impactful improvement would be landing #4232, which would prevent the recurring architecture mismatch in the ai-integrations workspace.

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

Labels

ready-for-review Agent PR ready for human review requires-manual-review Review requires human judgment workspace/ai-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ai-integrations: catalog processor validation for AiResource agent type

2 participants