Repository navigation
feat(qoder): write directory-scoped rules to <dir>/.qoder/rules - #3980
Merged
Merged
Conversation
Qoder loads .qoder/rules/**/*.md in any project subdirectory on demand once it reads a file under that directory. A non-root rule carrying agentsmd.subprojectPath is now written to <subprojectPath>/.qoder/rules/ in project scope (mirroring Trae), and nested .qoder/rules/ folders are imported back with targets: [qoder] and the subprojectPath carried. Refs #3421 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Qoder matches a project rule's globs relative to the directory that holds its .qoder/ folder, so a nested rule's project-relative globs now lose the <subprojectPath>/ prefix on generate (with a warning for globs outside the subproject) and get it back on import. qoder.glob stays verbatim. Docs note the move of existing subproject rules and the glob rebase. Refs #3421 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…der-subproject-rules # Conflicts: # src/generated/docs-content.ts
This was referenced Nov 26, 2026
superbiche
pushed a commit
to superbiche/rulesync
that referenced
this pull request
Nov 29, 2026
Keep the Qoder nested subproject rules from dyoshikawa#3980 working for qodercn: resolve the rules directory and the imported target from the class. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
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
Follows the last open item of the Qoder upstream re-check in #3421:
agentsmd.subprojectPathwas ignored for Qoder rules, so a directory-scoped rule landed in the root.qoder/rules/. Qoder's memory docs ("Subdirectory memory", checked 2026-11-26) say<subdir>/.qoder/rules/**/*.mdis not preloaded and is loaded on demand once Qoder reads a file under that subdirectory (example:/repo/packages/app/.qoder/rules/*.md).Changes
QoderRule.fromRulesyncRule: a non-root, project-scope rule withagentsmd.subprojectPath(explicit or derived fromglobs) is written to<subprojectPath>/.qoder/rules/<name>.md, mirroringTraeRule(feat(trae): write directory-scoped rules to nested .trae/rules/ #3258).QoderRule.getNestedFilePatterns: imports nested**/.qoder/rules/**/*.md(root.qoder/rules/, hidden directories and the shared nested-scan exclusions skipped;ownedDirPathso the**/.qoder/rules/gitignore entry does not hide them).QoderRule.fromFile: a nested directory is recognised before the root-file dispatch (which treats every directory other than.qoder/rulesas a root-file location) and split into the subproject rules dir plus the inner path;toRulesyncRulewritestargets: ["qoder"]andagentsmd.subprojectPathback.qoder-rule.test.ts, an import/generate round-trip e2e test ine2e-rules.spec.ts, the Qoder note indocs/reference/file-formats.md(+ regenerateddocs-content.ts), and the factory comment.Design decisions
qoder.channel: output-stylerules never nest;""/././are treated as the project root.qoderonly, so the next generate does not create nested files for other tools or fold the rule into their root files..qoder/directory", so a nested rule's canonical (project-relative)globslose the<subprojectPath>/prefix on generate (packages/app/**/*becomesalways_on), a glob outside the subproject is written as is with a warning, and import puts the prefix back so round-trips are stable. An explicitqoder.globis tool-native and written verbatim.subprojectPathmoves from.qoder/rules/to<dir>/.qoder/rules/; the docs say to rungenerate --deleteonce to drop the old copy.generate --deletenever removes nested.qoder/rules/files (same as every other nested scan).AGENTS.md/AGENTS.local.md, which Qoder also loads on demand, stay with theagentsmdtarget; not duplicated here.Skipped
QueryEndhook event: still undocumented in the Qoder hooks reference, so it stays watch-only; the upstream re-check will refile it if it gets documented.Verification
pnpm cicheckpasses except for three time-budget tests (glob.test.ts,shell-command-categories.test.ts,opencode-hooks.test.ts) that time out on this machine (load average ~70 from parallel runs); they are unrelated to this change andshell-command-categoriespasses when rerun alone. The new e2e test passes.Closes #3421
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4