Repository navigation
feat: the agent chooses the domain folder and the save script checks it - #90
Merged
Merged
Conversation
Keyword routing guessed a domain name from domain_rules.yaml and created a new folder whenever the name did not literally match an existing one, so generic folders such as 大模型 kept appearing. Preflight now stops a new paper directory with domain_required and a domain_overview (the user's domains.md convention, or each folder's paper count and sample titles). The agent chooses with --domain; a new domain needs --new-domain-reason. Formal Save requires exactly one papers/<domain> tag naming the saved domain. run_state carries domain and new_domain_reason as run context. domain_rules.yaml, the keyword inference, and the old multi-part --subdir path handling are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Keyword routing guessed a domain name from
domain_rules.yamland created a new folder whenever the name did not literally match an existing one. That is how generic folders such as大模型kept appearing. The agent now chooses; the script only describes the domains and checks the choice.domain_overviewcomes from the user's convention in<Vault>/DeepPaperNote/domains.md(definition/includes/excludes) when it exists. Otherwise it lists each folder's paper count and up to eight sample titles. Folders where the convention and the disk disagree are marked._domain_routing.pyholds the overview, the validation, and the tag check.references/domain-routing.mdis the agent's guide.--subdiris replaced by--domain/--new-domain-reason.run_state:domainandnew_domain_reasonas run context.missing_context: [domain], not a user action.frontmatter_domain_tag_multiple.domain_rules.yaml;--subdirhandling (papers_dir prefixes, a subdir ending in the paper slug). A paper always lives at<domain>/<paper folder>/.Evidence
Tests:
python3 -m pytest -q: 1719 passed. The baseline on develop was 1714. Twelve keyword-routing tests and five old--subdirpath tests were removed, together with the behavior they covered.tests/test_domain_routing.py(18) and at the end oftests/test_run_state.py(4).formal_save_args(..., domain=...)does this throughtagged().Routing acceptance (local, on a copy of the maintainer's real library):
gpt-6.1-terra; each paper was judged blind by a fresh Sonnet 5.5 reviewer.推荐系统folder;心理健康;大模型.大模型, which only holds a video paper. The guide now says to judge a domain by its papers, not its name.Merge Danger
Door: two-way
Blast Radius: save path
--domain.papers/tags do not match the saved domain is refused.🤖 Generated with Claude Code