Repository navigation
feat(trae): write directory-scoped rules to nested .trae/rules/ - #3258
Merged
Merged
Conversation
A rule carrying agentsmd.subprojectPath is written to <dir>/.trae/rules/ (project scope only), and subdirectory .trae/rules/ folders are imported back through getNestedFilePatterns as trae-only rules carrying the subproject path. Global rules (~/.trae/user_rules) stay unsupported: their on-disk shape is still undocumented. Refs #3234 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
…nore entry The nested-scan gitignore filter tests the directories above each file, and the **/.trae/rules/ entry rulesync gitignore writes matched the nested rules directory itself, silently disabling the scan. Nested patterns can now name a tool-owned directory, and only the directories above it are tested. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
This was referenced Nov 19, 2026
Follow up Qoder upstream updates: output styles and non-permissions settings keys unauthorable
#3421
Closed
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
Resolves gap 2 of #3234 (nested
.trae/rules/in project subdirectories). Gap 1 (global rules at~/.trae/user_rules) remains open.agentsmd.subprojectPath(explicit or derived fromglobs) is written to<subprojectPath>/.trae/rules/<name>.mdinstead of the root.trae/rules/(project scope only; the root rule never nests). Frontmatter mapping is unchanged.TraeRule.getNestedFilePatternsscans**/.trae/rules/**/*.md, excluding the root.trae/rules/,.trae/rules/under any hidden directory (worktrees, other tools' output),node_modules/,__pycache__/and the root build/vendoring directories. The sharedbuildNestedFilePatternscould not be reused because its**/.*/**ignore would drop.traeitself.fromFilenow honors the directory the nested scan passes and re-splits it into<subproject>/.trae/rules+ the path inside it.file-formats.mdTrae note), processor comment, unit tests and an e2e import/generate round-trip test.Design choices
AGENTS.md/REASONIX.md). Same-named files in two rules directories collide, which the processor's existing import-time collision warning reports.["trae"], like Kiro/Reasonix nested imports, so the next generate does not make agentsmd/codexcli/etc. emit new nestedAGENTS.mdfiles.<dir>/**/*on import, unlike the AGENTS.md helper: Trae's mapping turns specific globs into a file-scoped rule, so injecting a directory glob would silently change an always-applied rule's activation mode. Globs on a nested rule are passed through unchanged (Trae does not document whether they are relative to the subproject or the project root)..trae/rules/("About multi-level rule nesting"), not to per-subdirectory.trae/rules/folders, so no depth cap is encoded.--delete: like every other nested scan, nested files are import-only and never swept. The existing**/.trae/rules/gitignore entry already covers them.Remaining (gap 1)
Global rules are still not generated. The Trae docs list
~/.trae/user_rulesunder "Rule directories" but only describe creating global rules through the settings UI input box; they do not state file names, extension or format. Per the issue,supportsGlobalstaysfalseuntil the on-disk shape is confirmed on a real installation.Refs #3234
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj