Skip to content

feat: build skill to build eslint rule - #4985

Draft
marufrasully wants to merge 23 commits into
mainfrom
feat/skill-eslinb-rule-builder
Draft

feat: build skill to build eslint rule#4985
marufrasully wants to merge 23 commits into
mainfrom
feat/skill-eslinb-rule-builder

Conversation

@marufrasully

@marufrasully marufrasully commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a new AI agent skill for developing ESLint rules in the @sap-ux/eslint-plugin-fiori-tools package, along with minor cleanup of unused diagnostic fields.

New AI Agent Skill (.agents/skills/fiori-eslint-dev/)

Adds a comprehensive, step-by-step guide (SKILL.md) and reference files to automate the full ESLint rule development workflow. The skill covers:

  • Rule type identification — Annotation (XML/CDS), Manifest JSON, Flex change, or JS/TS rules
  • 9-step implementation checklist — from diagnostic constants to changeset creation
  • 4 reference files with fast-path guides and templates for each rule type:
    • references/annotation.md — OData annotation rules with two access patterns (page.lookup vs buildAnnotationIndexKey)
    • references/manifest-json.mdmanifest.json property validation rules
    • references/flex-change.md — V2 .change file validation rules
    • references/js-rule.md — standard JS/TS ESLint rules (no Fiori project model)

Each reference file lists exact files to read in parallel, provides ready-to-use rule and test templates, and includes a debug checklist.

Bug Fix in diagnostics.ts and sap-no-data-field-intent-based-navigation.ts

  • Removed unused file and annotationPath fields from the NoDataFieldIntentBasedNavigation diagnostic interface
  • Added a missing FioriAnnotationSourceCode guard in the rule's check() method to prevent it from running against non-annotation source code types

Type of change

  • Bug (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a new feature)
  • Breaking change (Bug or New feature that would cause existing functionality/consumers to not work as expected)
  • Non-Breaking chores (Changes to tools, libraries, build process, documentation, etc)
  • None of the above (Reviewers might ask for more clarification)

How have you tested?

The skill files are documentation/tooling only with no runtime impact. The diagnostic field removals and source code guard are verified by existing unit tests in the package.

Checklist:

  • The code conforms to the general development principles

  • Supplied as many details as possible on this change

  • The code is easy to read and maintainable by others

  • Corresponding changes to the documentation has been done

  • Already existing and new unit tests pass locally

  • 🔄 Regenerate and Update Summary

PR Bot Information

Version: 1.29.18

  • Summary Prompt: Default Prompt
  • LLM: anthropic--claude-4.6-sonnet
  • Event Trigger: pull_request.edited
  • Correlation ID: 73ffd3f0-916b-11f1-82a5-83037507a921
  • File Content Strategy: Full file content
  • Output Template: Repository PR Template

@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 82af751

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sap-ux/eslint-plugin-fiori-tools Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hyperspace-pr-bot hyperspace-pr-bot Bot 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.

The SKILL.md document provides a useful workflow guide but contains several substantive bugs in its code templates that would cause compile-time or runtime failures if followed literally: incorrect import paths (missing .js ESM extensions and wrong MemberNode source package), a fabricated context.getDiagnostic() API, a missing step to add the diagnostic interface and Diagnostic union entry in src/types.ts, a missing context argument in createJsonFixer calls, and a createInvalidTestCAP call that omits the required changes array argument. These issues should be addressed before the skill is used to generate new rules.

PR Bot Information

Version: 1.29.2

  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet
  • Experiment Variant: control
  • Agent Instructions:
  • Event Trigger: pull_request.opened
  • Correlation ID: a256f910-8994-11f1-8f17-268737328956

Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
Comment thread .agents/skills/fiori-eslint-dev/SKILL.md Outdated
@AlinaGovoruhina

Copy link
Copy Markdown
Contributor

One more thing I noticed: it hallucinates "Further Reading" links to documentation from the rule doc .md file. Maybe more guidance needed there.

marufrasully and others added 2 commits August 3, 2026 11:34
Co-authored-by: Alina Govoruhina <125539086+AlinaGovoruhina@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

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.

3 participants