feat: use CLAUDE.md imports syntax for rule references#4
Merged
mattzcarey merged 2 commits intoStackOneHQ:mainfrom Aug 12, 2025
Merged
feat: use CLAUDE.md imports syntax for rule references#4mattzcarey merged 2 commits intoStackOneHQ:mainfrom
mattzcarey merged 2 commits intoStackOneHQ:mainfrom
Conversation
Replace markdown link syntax with @ syntax for file references to enable CLAUDE.md imports feature This allows Claude Code to automatically import referenced rules when reading the generated CLAUDE.md file
There was a problem hiding this comment.
cubic analysis
1 issue found across 1 file • Review in cubic
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| } | ||
|
|
||
| rulesContent += `Read the full rule [here](${rulesDir}/${rule.filename}.md)\n\n`; | ||
| rulesContent += `Read the full rule @${rulesDir}/${rule.filename}.md\n\n`; |
There was a problem hiding this comment.
Claude import syntax requires the path to appear at the beginning of the line; the explanatory prefix will stop Claude from importing the file.
Prompt for AI agents
Address the following comment on src/index.ts at line 148:
<comment>Claude import syntax requires the path to appear at the beginning of the line; the explanatory prefix will stop Claude from importing the file.</comment>
<file context>
@@ -145,7 +145,7 @@ ${DIVIDERS.GENERATED_BY}
rulesContent += `This refers to: ${rule.globs}\n\n`;
}
- rulesContent += `Read the full rule [here](${rulesDir}/${rule.filename}.md)\n\n`;
+ rulesContent += `Read the full rule @${rulesDir}/${rule.filename}.md\n\n`;
}
}
</file context>
Suggested change
| rulesContent += `Read the full rule @${rulesDir}/${rule.filename}.md\n\n`; | |
| rulesContent += `Read the full rule\n@${rulesDir}/${rule.filename}.md\n\n`; |
- Apply biome formatting to package.json - Update test expectations to match new @ syntax for file references
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Benefits
Summary by cubic
Updated CLAUDE.md rule references to use the @ imports syntax instead of markdown links, so Claude Code can automatically import referenced rules.