Skip to content

chore: add AGENTS.md file#2201

Merged
JammingBen merged 1 commit intomainfrom
chore/agents-md
Mar 23, 2026
Merged

chore: add AGENTS.md file#2201
JammingBen merged 1 commit intomainfrom
chore/agents-md

Conversation

@JammingBen
Copy link
Member

Adds instructions for agents via an AGENTS.md file.

@JammingBen JammingBen self-assigned this Mar 23, 2026
@JammingBen JammingBen added the Type:Maintenance E.g. technical debt, packaging, etc. label Mar 23, 2026
AGENTS.md Outdated
- **Linting** – enforced via ESLint (`packages/eslint-config`). Run `pnpm lint` to check.
- **Vue unref() vs .value** – prefer `unref()` for accessing Ref values for better readability. Use `.value` only when setting values (e.g. `foo.value = 'bar'` or `foo.value.push('bar')`).
- **Functions vs arrow functions** – prefer named `function` declarations over arrow functions. Use arrow functions only for callbacks or when the `this` context requires it.
- **Import from monorepo packages** – the only shared packages that can be imported from other packages are `web-pkg`, `web-client`, `web-test-helpers` and `design-system`. always check the `package.json` of the package you're importing from for the `exports` field. Never use relative paths (use e.g. `import { useFoo } from '@opencloud-eu/web-pkg'`, never use e.g. `import { useFoo } from '../../web-pkg/src/composables/foo'`).
Copy link
Member

Choose a reason for hiding this comment

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

shared packages and from other packages are two different scopes of the word packages. sounds super weird. but I guess it's fine 🙈

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you have an idea how to make it more clear? just leave out the word "shared"?

Copy link
Member Author

Choose a reason for hiding this comment

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

I adjusted it, I (and Claude :D ) think it's cleaner now.

- **Location:** `tests/unit/` inside each package, mirroring the `src/` folder structure.
- **File naming:** `{originalFileName}.spec.ts` (e.g. `src/composables/foo.ts` → `tests/unit/composables/foo.spec.ts`).
- **Helpers:** The `@opencloud-eu/web-test-helpers` package (`packages/web-test-helpers`) provides shared utilities for mounting components, mocking stores, etc. Use it instead of rolling your own helpers.
- **Snapshots:** Avoid using snapshot tests, as they can be brittle and hard to maintain. Prefer explicit assertions that check specific behavior or output.
Copy link
Member

Choose a reason for hiding this comment

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

thank you ❤️ I hate snapshot tests.

Adds instructions for agents via an `AGENTS.md` file.
@JammingBen JammingBen merged commit ed3ffc6 into main Mar 23, 2026
28 checks passed
@JammingBen JammingBen deleted the chore/agents-md branch March 23, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Maintenance E.g. technical debt, packaging, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants