Feature Planning
Create a plan in specs/<YYYY-MM-DD>-<feature-name>.md for the Feature below.
Example: specs/2026-01-30-user-authentication-refactoring.md
Instructions
- Declare scope first - Determine if this is API-only, Web-only, Full-stack, or Shared
- Load only relevant context based on scope:
- API:
<root>/.claude/context/api/00-overview.md + specific patterns needed
- Web:
<root>/apps/web/CLAUDE.md + specific patterns needed
- Full-stack: Both overviews + specific patterns as needed
- Shared:
<root>/packages/shared/CLAUDE.md + check both API and Web CLAUDE.md for impact
- Explore targeted directories - Don't explore everything:
- API:
<root>/apps/api/src/[relevant-module]/
- Web:
<root>/apps/web/src/features/[relevant-feature]/
- Shared:
<root>/packages/shared/src/
- E2E:
<root>/apps/e2e-tests/tests/[relevant-feature]/ (if E2E tests are affected)
- Testing principles - Each test should verify a distinct behavior:
- Ask: "If test A passes, would test B always pass?" → If yes, test B is redundant
- Ask: "What unique failure mode does this test catch?"
- Avoid redundant tests (e.g., "response validation" covered by happy path)
- Follow existing patterns. Report new library needs in Notes.
- Feature flags - If the feature is behind an env flag, include
.env.example and .env.e2e in Files to Deliver.
- Database changes - If the feature requires schema changes, note that the
/create-database-migration skill must be used (never create migration files manually).
Plan Format
# Feature: <name>
## Feature Overview
<describe the feature in detail, including its purpose and value to users>
<How does the solution work? 2-3 sentences.>
## User Story
As a <user type>, I want to <goal> so that <benefit>.
## Scope
- [ ] API-only
- [ ] Web-only
- [ ] Full-stack
- [ ] Shared package
## Solution Statement
<describe the proposed solution approach and how it solves the problem>
## Relevant Files
Use these files to implement the feature:
<find and list the files that are relevant to the feature — pattern references, files to modify,
test helpers. Group by concern (e.g. "Step Definition & Registration", "Pattern References", "Tests").>
## Files to Deliver
### Test Files
<!-- List ALL test files that must be created or modified. These are implemented FIRST. -->
| File Path | Tests | Verifies |
|-----------|-------|----------|
| `path/to/file.spec.ts` | test case 1, test case 2 | `path/to/production-file.ts` |
### Production Files
<!-- List ALL production files to create or modify. Implemented AFTER tests. -->
| File Path | Purpose |
|-----------|---------|
| `path/to/new-file.ts` | Description of what this file does |
| `path/to/existing-file.ts` | What modifications are needed |
## Step by Step Tasks
<list step by step tasks as h3 headers plus bullet points. Order matters: start with foundational
shared/API changes, then web, then E2E updates.
For each step that creates new functionality:
1. First list the test file(s) to create with their test cases
2. Then list the production code to implement
3. End with the specific test command to run for that step
Do NOT add a final "run Validation Commands" step — that section stands on its own.>
## Acceptance Criteria
<list specific, measurable criteria that must be met for the feature to be considered complete>
## Testing Strategy
### Unit Tests
<describe unit tests needed - each should test a distinct behavior>
### Integration Tests
<describe integration tests needed - typically: happy path, error cases, edge cases.
Write "None required" if this is a web-only feature with no API changes.>
### E2E Tests
<describe whether existing E2E tests need updating or new ones are needed.
Write "None required" if no user-visible flow changes.>
### Edge Cases
<list edge cases that need to be tested - only if they catch distinct failure modes>
## Validation Commands
<Specific commands to validate with 100% confidence the feature is implemented with zero regressions. Start with the most specific commands and end with broader ones.>
## Notes
<Optional: list any additional notes, future considerations, or context>
Feature
$ARGUMENTS
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: incubateur-ademe-benefriches-plan-feature3description: Feature Planning4---56# Feature Planning78Create a plan in `specs/<YYYY-MM-DD>-<feature-name>.md` for the `Feature` below.9Example: `specs/2026-01-30-user-authentication-refactoring.md`1011## Instructions12131. **Declare scope first** - Determine if this is API-only, Web-only, Full-stack, or Shared142. **Load only relevant context** based on scope:15 - API: `<root>/.claude/context/api/00-overview.md` + specific patterns needed16 - Web: `<root>/apps/web/CLAUDE.md` + specific patterns needed17 - Full-stack: Both overviews + specific patterns as needed18 - Shared: `<root>/packages/shared/CLAUDE.md` + check both API and Web CLAUDE.md for impact193. **Explore targeted directories** - Don't explore everything:20 - API: `<root>/apps/api/src/[relevant-module]/`21 - Web: `<root>/apps/web/src/features/[relevant-feature]/`22 - Shared: `<root>/packages/shared/src/`23 - E2E: `<root>/apps/e2e-tests/tests/[relevant-feature]/` (if E2E tests are affected)244. **Testing principles** - Each test should verify a distinct behavior:25 - Ask: "If test A passes, would test B always pass?" → If yes, test B is redundant26 - Ask: "What unique failure mode does this test catch?"27 - Avoid redundant tests (e.g., "response validation" covered by happy path)285. Follow existing patterns. Report new library needs in Notes.296. **Feature flags** - If the feature is behind an env flag, include `.env.example` and `.env.e2e` in Files to Deliver.307. **Database changes** - If the feature requires schema changes, note that the `/create-database-migration` skill must be used (never create migration files manually).3132## Plan Format3334````md35# Feature: <name>3637## Feature Overview38<describe the feature in detail, including its purpose and value to users>39<How does the solution work? 2-3 sentences.>4041## User Story42As a <user type>, I want to <goal> so that <benefit>.4344## Scope45- [ ] API-only46- [ ] Web-only47- [ ] Full-stack48- [ ] Shared package4950## Solution Statement51<describe the proposed solution approach and how it solves the problem>5253## Relevant Files54Use these files to implement the feature:5556<find and list the files that are relevant to the feature — pattern references, files to modify,57test helpers. Group by concern (e.g. "Step Definition & Registration", "Pattern References", "Tests").>5859## Files to Deliver6061### Test Files62<!-- List ALL test files that must be created or modified. These are implemented FIRST. -->63| File Path | Tests | Verifies |64|-----------|-------|----------|65| `path/to/file.spec.ts` | test case 1, test case 2 | `path/to/production-file.ts` |6667### Production Files68<!-- List ALL production files to create or modify. Implemented AFTER tests. -->69| File Path | Purpose |70|-----------|---------|71| `path/to/new-file.ts` | Description of what this file does |72| `path/to/existing-file.ts` | What modifications are needed |7374## Step by Step Tasks75<list step by step tasks as h3 headers plus bullet points. Order matters: start with foundational76shared/API changes, then web, then E2E updates.7778For each step that creates new functionality:791. First list the test file(s) to create with their test cases802. Then list the production code to implement813. End with the specific test command to run for that step8283Do NOT add a final "run Validation Commands" step — that section stands on its own.>8485## Acceptance Criteria86<list specific, measurable criteria that must be met for the feature to be considered complete>8788## Testing Strategy8990### Unit Tests91<describe unit tests needed - each should test a distinct behavior>9293### Integration Tests94<describe integration tests needed - typically: happy path, error cases, edge cases.95Write "None required" if this is a web-only feature with no API changes.>9697### E2E Tests98<describe whether existing E2E tests need updating or new ones are needed.99Write "None required" if no user-visible flow changes.>100101### Edge Cases102<list edge cases that need to be tested - only if they catch distinct failure modes>103104## Validation Commands105<Specific commands to validate with 100% confidence the feature is implemented with zero regressions. Start with the most specific commands and end with broader ones.>106107## Notes108<Optional: list any additional notes, future considerations, or context>109````110111## Feature112$ARGUMENTS113114---115> Converted and distributed by [TomeVault](https://tomevault.io/claim/incubateur-ademe) — claim your Tome and manage your conversions.116<!-- tomevault:4.0:skill_md:2026-04-11 -->