brainrc 0.8.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. brainrc/__init__.py +35 -0
  2. brainrc/__main__.py +6 -0
  3. brainrc/_core/CHANGELOG.md +747 -0
  4. brainrc/_core/VERSION +1 -0
  5. brainrc/_core/docs/schemas/brainrc.lock.schema.json +164 -0
  6. brainrc/_core/docs/schemas/brainrc.toml.schema.json +76 -0
  7. brainrc/_core/harnesses.toml +81 -0
  8. brainrc/_core/mcp/servers.toml +15 -0
  9. brainrc/_core/overrides/README.md +14 -0
  10. brainrc/_core/overrides/claude/hooks/check_mcp_pins.py +242 -0
  11. brainrc/_core/overrides/claude/hooks/guard_outward.py +299 -0
  12. brainrc/_core/overrides/claude/hooks/guard_secrets.py +122 -0
  13. brainrc/_core/overrides/claude/settings.fragment.json +38 -0
  14. brainrc/_core/overrides/cursor/hooks/guard.py +61 -0
  15. brainrc/_core/overrides/cursor/settings.fragment.json +15 -0
  16. brainrc/_core/overrides/opencode/plugin.js +50 -0
  17. brainrc/_core/packs.toml +26 -0
  18. brainrc/_core/rules/00-core.md +11 -0
  19. brainrc/_core/rules/10-git.md +11 -0
  20. brainrc/_core/rules/20-engineering.md +15 -0
  21. brainrc/_core/rules/30-guardrails.md +15 -0
  22. brainrc/_core/rules/40-security.md +13 -0
  23. brainrc/audit.py +272 -0
  24. brainrc/check.py +137 -0
  25. brainrc/cli.py +658 -0
  26. brainrc/config.py +511 -0
  27. brainrc/doctor.py +422 -0
  28. brainrc/frozen.py +234 -0
  29. brainrc/init.py +254 -0
  30. brainrc/jsonc.py +154 -0
  31. brainrc/lock.py +211 -0
  32. brainrc/manifest.py +108 -0
  33. brainrc/mcp.py +334 -0
  34. brainrc/mcp_pins.py +176 -0
  35. brainrc/migrate.py +199 -0
  36. brainrc/moved.py +63 -0
  37. brainrc/naming.py +123 -0
  38. brainrc/opencode.py +50 -0
  39. brainrc/packs.py +191 -0
  40. brainrc/permissions.py +211 -0
  41. brainrc/plan.py +265 -0
  42. brainrc/plugin.py +95 -0
  43. brainrc/plugins.py +137 -0
  44. brainrc/project.py +480 -0
  45. brainrc/release.py +127 -0
  46. brainrc/schema.py +108 -0
  47. brainrc/settings.py +109 -0
  48. brainrc/sources.py +462 -0
  49. brainrc/tokens.py +100 -0
  50. brainrc/uninstall.py +338 -0
  51. brainrc/update.py +131 -0
  52. brainrc/validate.py +319 -0
  53. brainrc-0.8.3.dist-info/METADATA +111 -0
  54. brainrc-0.8.3.dist-info/RECORD +57 -0
  55. brainrc-0.8.3.dist-info/WHEEL +4 -0
  56. brainrc-0.8.3.dist-info/entry_points.txt +2 -0
  57. brainrc-0.8.3.dist-info/licenses/LICENSE +21 -0
brainrc/__init__.py ADDED
@@ -0,0 +1,35 @@
1
+ """brainrc: sync this repo's skills, agents, commands, rules, and hooks into AI harnesses.
2
+
3
+ Run it with `python3 scripts/brainrc.py <command>` or `python3 -m brainrc <command>`; usage is in
4
+ `brainrc.cli`. Below are the names tests and scripts/evals.py use. Shared state such as `REPO`
5
+ lives in the module that owns it (`brainrc.config.REPO`), so patch it there.
6
+ """
7
+ from . import cli, config, doctor, init, mcp, opencode, plan, plugin, plugins, settings, tokens, uninstall, validate # noqa: F401
8
+ from .config import (
9
+ BACKUPS_KEPT,
10
+ HOOKS_DIR_PLACEHOLDER,
11
+ rendered_instructions,
12
+ settings_home,
13
+ tilde,
14
+ )
15
+ from .sources import (
16
+ Source,
17
+ frontmatter,
18
+ load_pack,
19
+ markdown_files,
20
+ parse_constraint,
21
+ render_instructions,
22
+ rule_text,
23
+ satisfies,
24
+ skills,
25
+ sources,
26
+ )
27
+ from .opencode import opencode_agent
28
+ from .plan import Link, SettingsMerge, link_target, render_fragment
29
+ from .settings import _owned, merge_settings
30
+ from .plugin import check_plugin, cmd_plugin, plugin_manifests
31
+ from .release import check_fragments, cmd_release, next_version, parse_fragment
32
+ from .tokens import always_tokens, check_budgets, cmd_tokens, estimate_tokens
33
+ from .validate import cmd_validate
34
+ from .doctor import cmd_doctor, doctor_findings
35
+ from .cli import cmd_sync, cmd_update, main
brainrc/__main__.py ADDED
@@ -0,0 +1,6 @@
1
+ """`python3 -m brainrc <command>`: the same commands as `python3 scripts/brainrc.py`."""
2
+ import sys
3
+
4
+ from .cli import main
5
+
6
+ sys.exit(main(sys.argv))