Skip to content

chore: add initial AGENTS.md#21186

Draft
Platonn wants to merge 11 commits intodevelopfrom
feature/CXSPA-12195
Draft

chore: add initial AGENTS.md#21186
Platonn wants to merge 11 commits intodevelopfrom
feature/CXSPA-12195

Conversation

@Platonn
Copy link
Contributor

@Platonn Platonn commented Feb 23, 2026

fixes https://jira.tools.sap/browse/CXSPA-12195

TODO in other PRs - iteratively fill in sections:

  • Coding Best Practices
  • Troubleshooting
  • Common Mistakes to Avoid

@Platonn Platonn requested a review from a team as a code owner February 23, 2026 14:12
@github-actions github-actions bot marked this pull request as draft February 23, 2026 14:13
@Platonn Platonn changed the title chore: initial AGENTS.md chore: add initial AGENTS.md Feb 23, 2026
@@ -0,0 +1 @@
@AGENTS.md No newline at end of file
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As of today, Claude Code doesn't pick AGENTS.md. This is a documented workaround on Claude docs:
https://code.claude.com/docs/en/claude-code-on-the-web#best-practices

Comment on lines +43 to +45
# E2E
npm run e2e:run
npm run e2e:run:b2b
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, regarding e2e, might be nice to introduce later an example of fine-grained command that runs only affected e2es (to avoid situation where agent runs all tests, which might be redundant and heavy). But it might be a different story, and should be leveraged first to Nx to use its affected functionality 🤔

Copy link
Contributor Author

@Platonn Platonn Feb 24, 2026

Choose a reason for hiding this comment

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

good point. i found AI agents (and myelf too 😅 ) often struggle to remember how to run tests for a specific file - in Jest vs Jasmine

done

| `tools/eslint-rules/` | Custom ESLint rules |
| `tools/build-lib/` | Custom Angular builders for library builds |
| `ci-scripts/` | Scripts used by CI to check peer deps, feature toggles, unit tests, E2E |
| `.github/workflows/` | GitHub Actions CI/CD pipelines |
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn’t we add the path to where our styles are located?
| projects/storefrontstyles/scss/ | Styles |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. fixed

AGENTS.md Outdated

# SSR E2E
npm run build:ssr:local-http-backend # special build prerequisite before SSR E2E
npm run test:sst
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't be npm run test:ssr?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. fixed

Copy link
Contributor

@pawelfras pawelfras left a comment

Choose a reason for hiding this comment

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

After second thoughts and discussion offline, let's revisit what is really unique/opinionated in our project, that whould worth to let agent know about and also, what could be extracted to separate skills, so that we do not clutter the context with redundant information.
Food for thought (from Addy Osmani's post)

Treat your AGENTS.md as a living list of codebase smells you haven't fixed yet. If an agent keeps reaching for the wrong dependency or putting utilities in the wrong folder, don't just add a prose instruction to the context file. Restructure the code, add a linter rule, or improve the test coverage. Treat it as a diagnostic tool, fix the underlying friction, and then delete the line.

rmch91
rmch91 previously approved these changes Feb 25, 2026
AGENTS.md Outdated

- **NEVER** add/change `peerDependencies` in library `package.json` files — causes breaking changes for customers. Add `devDependencies` to root `package.json` only if truly needed for development.
- **NEVER** introduce breaking changes without feature toggles (since v2211.19, no SemVer). If you must change behavior, styling, or public API, add a feature toggle.
- **ALWAYS** export public APIs through `public_api.ts` files via barrel files. Never export APIs explicitly marked as internal.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add also information to not use private access modifiers?

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.

5 participants