DevelopAI
@holtkeeper/rules
The rules every agent run follows on a repository, and the rules Holtkeeper learns. It follows the shape the AI review and coding-agent tools settled on: people write Markdown rules, scoped by paths; learned rules are kept apart, labelled, ranked below the written ones, and expire when nothing confirms them.
Sources
Section titled “Sources”-
Repository rules files (
readRepoRules,parseRuleFile,ruleFilePaths), read-only:- root
REVIEW.md,AGENTS.md,CLAUDE.md,.github/copilot-instructions.md,CONTRIBUTING.md(ROOT_RULE_FILES, in that order): always apply; - a nested
AGENTS.mdorCLAUDE.md: applies to files under its folder; .github/instructions/**/*.instructions.md:applyToglobs,excludeAgent(code-reviewkeeps it out of reviews,coding-agentout of tasks);.cursor/rules/**/*.mdc,.continue/rules/*.md:alwaysApply,globs,description;.claude/rules/*.md:paths, otherwise always;.windsurf/rules/*.md:trigger(always_on,glob,model_decision;manualis skipped).
Files under
node_modules,vendor,dist,buildare ignored; at mostMAX_RULE_FILESare read. A file with only adescriptionis offered to agents (requested) instead of injected. - root
-
Rules (
Rulein @holtkeeper/store): written in the panel for every repository, teams (a team is its set of repositories) or repository patterns.filesglobs make a rule apply only when the task touches a matching file,agentslimits it to reviews, tasks, chat or release notes, and a rule with only adescriptionis offered instead of injected (ruleActivation). -
Learnings (
Learning): one-sentence rules learned from replies to review comments, mined from merged merge requests, proposed by agents, or written by a person. -
Policies (
policiesFor): settings rendered as plain facts — no tests by design, test ids and the asset policy (reviews and tasks), commit conventions (release notes, tasks, chat).
Learning lifecycle
Section titled “Learning lifecycle”newLearning makes a learning pending for approvalDelayDays (default 3), after which settleLearning makes it active; a person may approve or reject it earlier (decideLearning). A delay of 0, or a learning a person wrote, is active at once. An active learning not reinforced for expiryDays (default 90) becomes expired. reinforceLearning counts a citation as a use; a new source, a citation whose finding was fixed or an up vote reinforce it and bring an expired one back. findDuplicateLearning matches the same normalized text (learningKey) or a word overlap of at least 0.8, rejected learnings included, so callers merge instead of adding. byLearningRank orders by learningScore (fixed citations, uses, votes, sources), then recency.
Resolver
Section titled “Resolver”resolveRules(input) is pure and deterministic. Blocks, strongest first:
- panel rules that always apply, broadest scope first (all, teams, repository patterns);
- root repository rules files;
- file-scoped panel rules, then nested and file-scoped repository files, that match the touched
files(withoutfiles, all of them, each titled with the paths it applies to); - policies;
- active learnings that apply, under
LEARNED_HEADER, best ranked first. Withfiles, learned rules are ordered first by how much they are about the touched files (scoped byfilesglobs, then how many path words and words of the file kinds they mention:.tsxbrings component, react, props, …) and only then by score.
The text starts with RULES_HEADER; agents cite [rule:<id>] and [learn:<id>]. DEFAULT_RULE_BUDGET: 12 000 characters in all, rules files at most 4 800 together (cut at a line break with [… truncated, see <file>]), learnings at most 3 000 and dropped whole (the cut warning says how many and that search_knowledge finds them by topic). A block with less than 200 characters of room is left out. Every cut adds a warning. The result lists every block with chars, fullChars and cut (the effective-prompt view), and the requested rules.