All challengesCHALLENGE 22 OF 25

Fix a Legacy Package Scope

Keep legacy package rules scoped to that package.

Advanced

Goal

Keep legacy exceptions scoped to the legacy package instead of allowing them to affect the entire repository.

Repository Context

This monorepo contains modern TypeScript packages and one legacy JavaScript package.

Code exampleMarkdown
platform/
├── AGENTS.md
├── packages/
│   ├── web/
│   ├── api/
│   └── legacy-reports/
│       └── AGENTS.md
└── package.json

Repository-wide standards:

Code exampleMarkdown
Language       TypeScript
Package manager pnpm
Testing         Vitest

The legacy-reports package still uses JavaScript and Jest.

It is being maintained but is not currently being migrated.

Legacy exceptions should apply only under:

Code exampleMarkdown
packages/legacy-reports/

Current AGENTS.md

The root AGENTS.md contains:

Code exampleMarkdown
# Project Instructions

## Development

- Use `pnpm`.
- Write new application code in TypeScript.
- JavaScript is acceptable because some packages still use it.
- Use Vitest for tests.
- Jest may be used anywhere in the repository because the legacy package depends on it.

The current packages/legacy-reports/AGENTS.md contains:

Code exampleMarkdown
# Legacy Reports Instructions

- Preserve existing behavior when making changes.

Your Task

Move the JavaScript and Jest exceptions out of the root instructions and scope them to packages/legacy-reports/AGENTS.md.

Keep the repository-wide TypeScript and Vitest standards at the root.

YOUR AGENTS.mdEdit the Current AGENTS.md shown in the challenge
AGENTS.mdMarkdown

This challenge contains multiple AGENTS.md files in one editor. Lines beginning with === identify file boundaries. Keep the markers intact and edit instructions within the appropriate file section.

Loading editor…

Sign in to save progress across devices.

Your answer is checked locally against the challenge rules. No AI is used for evaluation.