Skip to content

Commit eaf144d

Browse files
authored
improvement: replace auto-sync with notice (#12)
Old code automatically ran `mix usage_rules.sync` after install, forcing the developer to delete AGENTS.md and re-sync. New code eliminates the auto-sync, and instead emits a notice with example commands.
1 parent 2abbfbf commit eaf144d

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

lib/mix/tasks/usage_rules.install.ex

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,16 @@ if Code.ensure_loaded?(Igniter) do
4444

4545
@impl Igniter.Mix.Task
4646
def igniter(igniter) do
47-
file =
48-
Enum.find(
49-
["AGENTS.md", "CLAUDE.md", "RULES.md", "rules.md", "cursorrules", "rules"],
50-
"AGENTS.md",
51-
&Igniter.exists?(igniter, &1)
52-
)
53-
5447
igniter
55-
|> Igniter.compose_task("usage_rules.sync", [
56-
file,
57-
"--all",
58-
"--link-to-folder",
59-
"deps",
60-
"--inline",
61-
"usage_rules:all"
62-
])
48+
|> Igniter.add_notice("""
49+
`usage_rules` is installed!
50+
51+
Example sync commands:
52+
- `mix usage_rules.sync AGENTS.md --all --link-to-folder rules --inline usage_rules:all`
53+
- `mix usage_rules.sync RULES.md --all`
54+
55+
For more info and examples: `mix help usage_rules.sync`
56+
""")
6357
end
6458
end
6559
else

0 commit comments

Comments
 (0)