This file defines how Claude Code should behave in this project, including how to interpret annotation tags in spec files.
When working with Markdown files in the openspec/ directory, recognize and act on the following
HTML comment tags. After processing, remove all handled annotation tags from the file.
Never modify content that has no annotation tags.
| Tag | Action |
|---|---|
@claude: <instruction> |
Execute the instruction at that location |
@revise: <requirement> |
Rewrite the adjacent paragraph to meet the requirement |
@expand: <direction> |
Expand and elaborate on the adjacent content |
@delete |
Remove the annotated content block entirely |
@todo |
Mark as incomplete — ask me how to fill it in before proceeding |
@discuss: <question> |
Pause and analyze the question, present options before editing |
@keep |
Do not modify this content under any circumstance |
@note: <remark> |
Informational only — do not trigger any modification, preserve the comment |
<!-- @claude: Generate a TypeScript interface based on the fields described below -->
User object contains: id, name, email, created_at, role
<!-- @revise: Rewrite in technical language targeting backend engineers -->
The sync feature copies files from repo1 to repo2.
<!-- @expand: Add details about exclude rule configuration options -->
The tool supports excluding specific directories.
<!-- @delete -->
This section is outdated and should be removed.
<!-- @todo -->
Authentication flow details go here.
<!-- @discuss: Should we use REST or GraphQL for this endpoint? -->
<!-- @note: This section was reviewed on 2025-01-01, no changes needed -->
System supports both MySQL and PostgreSQL.
Some important constraint that must never change. <!-- @keep -->- Process all annotation tags in a single pass unless a
@discussor@todotag is encountered. - On
@discuss— stop, present analysis and options, wait for confirmation before editing. - On
@todo— stop, ask how the section should be filled in, then proceed after response. - After processing, delete all handled tags (
@claude,@revise,@expand,@delete). - Always preserve
@notecomments and@keeptags — never remove them. - Never touch content outside the scope of an annotation tag.