luna-agents 2.0.1

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 (290) hide show
  1. package/.claude-plugin/LICENSE +21 -0
  2. package/.claude-plugin/README.md +285 -0
  3. package/.claude-plugin/claude-plugin.json +106 -0
  4. package/.claude-plugin/index.js +318 -0
  5. package/.claude-plugin/lib/api-client.js +504 -0
  6. package/.claude-plugin/lib/rag-utils.js +442 -0
  7. package/.claude-plugin/package.json +418 -0
  8. package/LICENSE +21 -0
  9. package/README.md +350 -0
  10. package/agents/json/design-architect.json +57 -0
  11. package/agents/json/luna-auth.json +71 -0
  12. package/agents/json/luna-brand.json +66 -0
  13. package/agents/json/luna-cloudflare.json +261 -0
  14. package/agents/json/luna-code-review.json +63 -0
  15. package/agents/json/luna-deployment.json +68 -0
  16. package/agents/json/luna-documentation.json +85 -0
  17. package/agents/json/luna-hig.json +128 -0
  18. package/agents/json/luna-layout-designer.json +178 -0
  19. package/agents/json/luna-monitoring-observability.json +64 -0
  20. package/agents/json/luna-post-launch-review.json +68 -0
  21. package/agents/json/luna-requirements-analyzer.json +53 -0
  22. package/agents/json/luna-task-executor.json +63 -0
  23. package/agents/json/luna-task-planner.json +62 -0
  24. package/agents/json/luna-testing-validation.json +66 -0
  25. package/agents/luna-365-security.md +96 -0
  26. package/agents/luna-analytics.md +318 -0
  27. package/agents/luna-api-generator.md +654 -0
  28. package/agents/luna-auth.md +396 -0
  29. package/agents/luna-brand.md +248 -0
  30. package/agents/luna-cloudflare.md +728 -0
  31. package/agents/luna-code-review.md +487 -0
  32. package/agents/luna-database.md +453 -0
  33. package/agents/luna-deployment.md +202 -0
  34. package/agents/luna-design-architect.md +353 -0
  35. package/agents/luna-docker.md +615 -0
  36. package/agents/luna-documentation.md +177 -0
  37. package/agents/luna-full-test.md +910 -0
  38. package/agents/luna-glm-vision.md +211 -0
  39. package/agents/luna-hig.md +430 -0
  40. package/agents/luna-lemonsqueezy.md +441 -0
  41. package/agents/luna-monitoring-observability.md +199 -0
  42. package/agents/luna-openai-app.md +499 -0
  43. package/agents/luna-post-launch-review.md +191 -0
  44. package/agents/luna-rag-enhanced.md +1619 -0
  45. package/agents/luna-rag.md +1733 -0
  46. package/agents/luna-requirements-analyzer.md +189 -0
  47. package/agents/luna-run.md +620 -0
  48. package/agents/luna-seo.md +338 -0
  49. package/agents/luna-task-executor.md +371 -0
  50. package/agents/luna-task-planner.md +275 -0
  51. package/agents/luna-testing-validation.md +681 -0
  52. package/agents/luna-ui-fix.md +591 -0
  53. package/agents/luna-ui-test.md +600 -0
  54. package/agents/luna-user-guide.md +409 -0
  55. package/agents/site-auditor.md +83 -0
  56. package/commands/3d-mesh.md +12 -0
  57. package/commands/3d.md +12 -0
  58. package/commands/agent-boost.md +13 -0
  59. package/commands/ai-index.md +16 -0
  60. package/commands/api.md +12 -0
  61. package/commands/assert.md +17 -0
  62. package/commands/audience.md +12 -0
  63. package/commands/auth.md +17 -0
  64. package/commands/autopilot.md +12 -0
  65. package/commands/boost-finsavvy.md +10 -0
  66. package/commands/boost-org.md +10 -0
  67. package/commands/boost-project.md +12 -0
  68. package/commands/brand.md +17 -0
  69. package/commands/browser-test.md +18 -0
  70. package/commands/cf.md +26 -0
  71. package/commands/cfg.md +33 -0
  72. package/commands/chain.md +12 -0
  73. package/commands/challenge.md +13 -0
  74. package/commands/clone.md +12 -0
  75. package/commands/cmds.md +243 -0
  76. package/commands/collab.md +12 -0
  77. package/commands/compete.md +12 -0
  78. package/commands/config-rules.md +21 -0
  79. package/commands/connect-infra.md +10 -0
  80. package/commands/context-pack.md +13 -0
  81. package/commands/curb.md +12 -0
  82. package/commands/des.md +38 -0
  83. package/commands/devto.md +20 -0
  84. package/commands/dock.md +26 -0
  85. package/commands/docs.md +33 -0
  86. package/commands/e2e-flow.md +18 -0
  87. package/commands/email-routing.md +10 -0
  88. package/commands/feature.md +12 -0
  89. package/commands/figma.md +12 -0
  90. package/commands/fix.md +12 -0
  91. package/commands/flaky.md +12 -0
  92. package/commands/flow-record.md +12 -0
  93. package/commands/gamify.md +12 -0
  94. package/commands/ghost.md +12 -0
  95. package/commands/git-insights.md +12 -0
  96. package/commands/go-viral.md +16 -0
  97. package/commands/go.md +42 -0
  98. package/commands/graph-rag.md +13 -0
  99. package/commands/guard.md +12 -0
  100. package/commands/heal.md +17 -0
  101. package/commands/heygen.md +12 -0
  102. package/commands/hig.md +33 -0
  103. package/commands/idea.md +12 -0
  104. package/commands/imagine.md +12 -0
  105. package/commands/inbox.md +12 -0
  106. package/commands/lam.md +12 -0
  107. package/commands/landing.md +12 -0
  108. package/commands/launch.md +12 -0
  109. package/commands/learn.md +12 -0
  110. package/commands/leverage.md +12 -0
  111. package/commands/ll-365-secure.md +179 -0
  112. package/commands/ll-3d-mesh.md +94 -0
  113. package/commands/ll-3d.md +123 -0
  114. package/commands/ll-a11y-scan.md +143 -0
  115. package/commands/ll-a11y.md +71 -0
  116. package/commands/ll-agent-boost.md +92 -0
  117. package/commands/ll-agent-chain.md +104 -0
  118. package/commands/ll-ai-index.md +120 -0
  119. package/commands/ll-api-client.md +77 -0
  120. package/commands/ll-api.md +99 -0
  121. package/commands/ll-assert.md +73 -0
  122. package/commands/ll-audience.md +308 -0
  123. package/commands/ll-auth.md +145 -0
  124. package/commands/ll-autopilot.md +113 -0
  125. package/commands/ll-boost-finsavvy.md +106 -0
  126. package/commands/ll-boost-org.md +161 -0
  127. package/commands/ll-boost-project.md +118 -0
  128. package/commands/ll-brand.md +150 -0
  129. package/commands/ll-browser-test.md +203 -0
  130. package/commands/ll-challenge.md +124 -0
  131. package/commands/ll-changelog.md +80 -0
  132. package/commands/ll-ci.md +78 -0
  133. package/commands/ll-claude-instructions.md +80 -0
  134. package/commands/ll-clone.md +82 -0
  135. package/commands/ll-cloudflare.md +580 -0
  136. package/commands/ll-codemap.md +78 -0
  137. package/commands/ll-collab.md +87 -0
  138. package/commands/ll-compete.md +67 -0
  139. package/commands/ll-config-rules.md +255 -0
  140. package/commands/ll-config.md +434 -0
  141. package/commands/ll-connect-infra.md +123 -0
  142. package/commands/ll-context-pack.md +100 -0
  143. package/commands/ll-curb.md +164 -0
  144. package/commands/ll-debug.md +76 -0
  145. package/commands/ll-deploy.md +101 -0
  146. package/commands/ll-deps.md +70 -0
  147. package/commands/ll-design.md +86 -0
  148. package/commands/ll-devto-publish.md +172 -0
  149. package/commands/ll-dockerize.md +273 -0
  150. package/commands/ll-docs.md +123 -0
  151. package/commands/ll-e2e-flow.md +132 -0
  152. package/commands/ll-e2e-test.md +231 -0
  153. package/commands/ll-email-routing.md +130 -0
  154. package/commands/ll-env.md +70 -0
  155. package/commands/ll-execute.md +98 -0
  156. package/commands/ll-feature.md +80 -0
  157. package/commands/ll-figma.md +82 -0
  158. package/commands/ll-fix.md +76 -0
  159. package/commands/ll-flaky.md +151 -0
  160. package/commands/ll-flow-record.md +180 -0
  161. package/commands/ll-flowdocs.md +83 -0
  162. package/commands/ll-gamify.md +131 -0
  163. package/commands/ll-gemma4.md +84 -0
  164. package/commands/ll-ghost.md +79 -0
  165. package/commands/ll-git-insights.md +152 -0
  166. package/commands/ll-go-viral.md +171 -0
  167. package/commands/ll-graph-rag.md +113 -0
  168. package/commands/ll-guard.md +92 -0
  169. package/commands/ll-heal.md +135 -0
  170. package/commands/ll-heygen.md +203 -0
  171. package/commands/ll-hig.md +578 -0
  172. package/commands/ll-hld.md +84 -0
  173. package/commands/ll-i18n.md +74 -0
  174. package/commands/ll-idea.md +101 -0
  175. package/commands/ll-imagine.md +72 -0
  176. package/commands/ll-inbox.md +116 -0
  177. package/commands/ll-lam.md +93 -0
  178. package/commands/ll-landing.md +171 -0
  179. package/commands/ll-launch.md +100 -0
  180. package/commands/ll-learn.md +87 -0
  181. package/commands/ll-leverage.md +137 -0
  182. package/commands/ll-local-llm.md +131 -0
  183. package/commands/ll-ls-products.md +160 -0
  184. package/commands/ll-marketplace.md +130 -0
  185. package/commands/ll-mcp-publish.md +104 -0
  186. package/commands/ll-migrate.md +68 -0
  187. package/commands/ll-mock.md +79 -0
  188. package/commands/ll-money.md +87 -0
  189. package/commands/ll-monitor.md +120 -0
  190. package/commands/ll-morph.md +117 -0
  191. package/commands/ll-multi-agent.md +170 -0
  192. package/commands/ll-native.md +93 -0
  193. package/commands/ll-nexa.md +79 -0
  194. package/commands/ll-onboarding.md +84 -0
  195. package/commands/ll-openhands.md +78 -0
  196. package/commands/ll-organic-promote.md +260 -0
  197. package/commands/ll-parallel.md +74 -0
  198. package/commands/ll-payments.md +83 -0
  199. package/commands/ll-perf-trace.md +147 -0
  200. package/commands/ll-perf.md +65 -0
  201. package/commands/ll-persona.md +280 -0
  202. package/commands/ll-pipe.md +296 -0
  203. package/commands/ll-plan-impl.js +570 -0
  204. package/commands/ll-plan-v2.md +297 -0
  205. package/commands/ll-plan.md +87 -0
  206. package/commands/ll-postlaunch.md +109 -0
  207. package/commands/ll-pr.md +84 -0
  208. package/commands/ll-present.md +110 -0
  209. package/commands/ll-product-map.md +152 -0
  210. package/commands/ll-promote.md +352 -0
  211. package/commands/ll-publish.md +124 -0
  212. package/commands/ll-pulse.md +96 -0
  213. package/commands/ll-rag-guided.md +345 -0
  214. package/commands/ll-rag-upgrade.md +504 -0
  215. package/commands/ll-rag.md +343 -0
  216. package/commands/ll-record.md +114 -0
  217. package/commands/ll-refactor.md +71 -0
  218. package/commands/ll-requirements.md +71 -0
  219. package/commands/ll-review.md +92 -0
  220. package/commands/ll-rollback.md +66 -0
  221. package/commands/ll-routemap.md +79 -0
  222. package/commands/ll-rules.md +90 -0
  223. package/commands/ll-shortcuts.md +229 -0
  224. package/commands/ll-sing.md +99 -0
  225. package/commands/ll-site-audit.md +228 -0
  226. package/commands/ll-smart-route.md +92 -0
  227. package/commands/ll-smart-search.md +58 -0
  228. package/commands/ll-storybook.md +86 -0
  229. package/commands/ll-swarm.md +101 -0
  230. package/commands/ll-test.md +97 -0
  231. package/commands/ll-time-machine.md +72 -0
  232. package/commands/ll-ui-convert.md +433 -0
  233. package/commands/ll-video.md +108 -0
  234. package/commands/ll-vision-pipeline.md +247 -0
  235. package/commands/ll-vision.md +74 -0
  236. package/commands/ll-visual-diff.md +118 -0
  237. package/commands/ll-visual-qa.md +204 -0
  238. package/commands/ll-visual-regression.md +96 -0
  239. package/commands/ll-voice.md +138 -0
  240. package/commands/ll-watch.md +65 -0
  241. package/commands/ll-workflow.md +108 -0
  242. package/commands/ll-zen.md +98 -0
  243. package/commands/local-llm.md +12 -0
  244. package/commands/marketplace.md +13 -0
  245. package/commands/mcp-publish.md +16 -0
  246. package/commands/migrate.md +12 -0
  247. package/commands/money.md +12 -0
  248. package/commands/morph.md +12 -0
  249. package/commands/multi-agent.md +12 -0
  250. package/commands/native.md +12 -0
  251. package/commands/nexa.md +12 -0
  252. package/commands/oh.md +12 -0
  253. package/commands/organic-promote.md +16 -0
  254. package/commands/perf-trace.md +12 -0
  255. package/commands/perf.md +12 -0
  256. package/commands/persona.md +12 -0
  257. package/commands/pipe.md +21 -0
  258. package/commands/plan.md +38 -0
  259. package/commands/pr.md +12 -0
  260. package/commands/present.md +12 -0
  261. package/commands/product-map.md +13 -0
  262. package/commands/promote.md +16 -0
  263. package/commands/publish.md +12 -0
  264. package/commands/pulse.md +12 -0
  265. package/commands/q.md +35 -0
  266. package/commands/record.md +12 -0
  267. package/commands/refactor.md +12 -0
  268. package/commands/req.md +40 -0
  269. package/commands/retro.md +33 -0
  270. package/commands/rev.md +39 -0
  271. package/commands/rules.md +19 -0
  272. package/commands/search.md +12 -0
  273. package/commands/sec.md +34 -0
  274. package/commands/ship.md +39 -0
  275. package/commands/sing.md +12 -0
  276. package/commands/site-audit.md +12 -0
  277. package/commands/smart-route.md +13 -0
  278. package/commands/swarm.md +12 -0
  279. package/commands/test.md +39 -0
  280. package/commands/time-machine.md +12 -0
  281. package/commands/ui.md +33 -0
  282. package/commands/video.md +12 -0
  283. package/commands/vision.md +12 -0
  284. package/commands/voice.md +12 -0
  285. package/commands/vr.md +18 -0
  286. package/commands/watch.md +39 -0
  287. package/commands/workflow.md +19 -0
  288. package/commands/zen.md +12 -0
  289. package/package.json +76 -0
  290. package/setup.sh +382 -0
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: ll-collab
3
+ displayName: Luna Collab
4
+ description: Team collaboration workflows — standup generation, sprint retros, PR reviews, knowledge sharing, onboarding
5
+ version: 1.0.0
6
+ category: team
7
+ agent: luna-task-planner
8
+ parameters:
9
+ - name: action
10
+ type: string
11
+ description: "Action: standup, retro, review-all, onboard, knowledge, handoff"
12
+ required: true
13
+ prompt: true
14
+ mcp_servers:
15
+ - git
16
+ - memory
17
+ - fetch
18
+ - sequential-thinking
19
+ ---
20
+
21
+ # /collab — Team Intelligence
22
+
23
+ Automate team workflows that usually eat hours of meetings and coordination.
24
+
25
+ ## Actions
26
+
27
+ ### /collab standup
28
+ ```
29
+ Auto-generates daily standup from git activity:
30
+ ├── What was merged yesterday (per person)
31
+ ├── What's in progress (open PRs, active branches)
32
+ ├── Blockers detected (failing CI, stale PRs, dependency conflicts)
33
+ ├── Deploy status (what's in staging, what's in prod)
34
+ └── Today's priorities (from sprint board)
35
+ ```
36
+
37
+ ### /collab retro
38
+ ```
39
+ Auto-generates sprint retrospective:
40
+ ���── Velocity: points completed vs planned
41
+ ├── Quality: bugs shipped, hotfixes needed
42
+ ├── Code health: coverage delta, tech debt change
43
+ ├── Highlights: biggest features shipped
44
+ ├── Incidents: outages, rollbacks, security issues
45
+ └── Patterns: what's improving, what's degrading
46
+ ```
47
+
48
+ ### /collab review-all
49
+ ```
50
+ Review all open PRs in one shot:
51
+ ├── For each open PR:
52
+ │ ├── Code review (security, quality, tests)
53
+ │ ├── Visual diff (screenshot comparison)
54
+ │ ├── Impact assessment (what it changes)
55
+ │ └── Recommendation (approve, request changes, needs discussion)
56
+ └─�� Priority-ranked summary
57
+ ```
58
+
59
+ ### /collab onboard
60
+ ```
61
+ Generate onboarding guide for a new team member:
62
+ ├── Architecture overview with diagrams
63
+ ├── Setup instructions (tested and verified)
64
+ ├���─ Key files and entry points explained
65
+ ├── Common workflows and conventions
66
+ ├── First PR suggestion (good-first-issue)
67
+ └── Team contacts and communication channels
68
+ ```
69
+
70
+ ### /collab handoff
71
+ ```
72
+ Generate handoff document when leaving a project:
73
+ ├── Current state of all features
74
+ ├── Known issues and workarounds
75
+ ├── Architecture decisions and reasoning
76
+ ├── Deployment procedures
77
+ ├── Monitoring and alerting setup
78
+ └── Contacts and tribal knowledge
79
+ ```
80
+
81
+ ## In Pipes
82
+
83
+ ```bash
84
+ /pipe collab standup >> notify team
85
+ /pipe collab retro >> ghost blog "sprint retrospective"
86
+ /pipe collab review-all >> assert "all PRs approved" >> launch
87
+ ```
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: ll-compete
3
+ displayName: Luna Compete
4
+ description: Competitive intelligence — analyze any competitor's product, tech stack, pricing, features, and generate your advantage plan
5
+ version: 1.0.0
6
+ category: strategy
7
+ agent: luna-task-planner
8
+ parameters:
9
+ - name: competitor
10
+ type: string
11
+ description: Competitor URL, name, or GitHub repo
12
+ required: true
13
+ prompt: true
14
+ mcp_servers:
15
+ - fetch
16
+ - playwright
17
+ - puppeteer
18
+ - zai-mcp-server
19
+ - image-compare
20
+ - git
21
+ - sequential-thinking
22
+ - memory
23
+ ---
24
+
25
+ # /compete — Know Your Enemy, Build Your Advantage
26
+
27
+ Deep-dive analysis of any competitor. Scrape their product, reverse-engineer their stack, analyze their UX, map their features, and generate your differentiation strategy.
28
+
29
+ ## Analysis Layers
30
+
31
+ ```
32
+ /compete https://linear.app
33
+
34
+ ┌─────────┼─────────┐
35
+ ▼ ▼ ▼
36
+ PRODUCT TECH BUSINESS
37
+ ├ Features ├ Stack ├ Pricing tiers
38
+ ├ UX/UI ├ Perf ├ Target market
39
+ ├ Flows ├ API ├ Growth signals
40
+ ├ Mobile ├ SEO ├ Team size
41
+ └ A11y └ Infra └ Funding
42
+ │ │ │
43
+ └─────────┼─────────┘
44
+
45
+ DIFFERENTIATION PLAN
46
+ ├── Features they're missing
47
+ ├── UX improvements over them
48
+ ├── Pricing advantage opportunities
49
+ ├── Technical advantages you can build
50
+ └── Go-to-market positioning
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ```bash
56
+ /compete https://linear.app # Full analysis
57
+ /compete https://n8n.io # Workflow competitor
58
+ /compete https://github.com/langchain-ai/langchain # Open source competitor
59
+ /compete "Zapier, Make, n8n" # Multi-competitor comparison
60
+ ```
61
+
62
+ ## In Pipes
63
+
64
+ ```bash
65
+ /pipe compete "competitor.com" >> idea "build a better version" >> plan >> go *10
66
+ /pipe compete "top 3 competitors" >> brand >> marketing >> launch
67
+ ```
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: ll-config-rules
3
+ displayName: Luna Persistent Rules
4
+ description: Define persistent project rules that auto-apply to every Luna session, pipe, and agent
5
+ version: 1.0.0
6
+ category: configuration
7
+ agent: luna-task-executor
8
+ parameters:
9
+ - name: action
10
+ type: string
11
+ description: Action (set, get, list, remove, init, export)
12
+ required: true
13
+ prompt: true
14
+ workflow:
15
+ - load_rules_config
16
+ - execute_action
17
+ - save_rules_config
18
+ output:
19
+ - .luna/rules.yaml
20
+ prerequisites: []
21
+ ---
22
+
23
+ # Luna Persistent Rules
24
+
25
+ Define project-wide rules that **auto-apply to every session, pipe, and agent**.
26
+
27
+ Stored in `.luna/rules.yaml` — committed to git, shared with your team.
28
+
29
+ ---
30
+
31
+ ## Quick Start
32
+
33
+ ```
34
+ /config-rules init # Create .luna/rules.yaml with defaults
35
+ /config-rules set max-lines 100 # Set max file size
36
+ /config-rules set coverage 90 # Set coverage threshold
37
+ /config-rules list # Show all active rules
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Rules File: `.luna/rules.yaml`
43
+
44
+ ```yaml
45
+ # .luna/rules.yaml — Persistent Luna rules
46
+ # These apply to EVERY Luna session, pipe, and agent automatically
47
+
48
+ version: 1
49
+
50
+ # ── Code Quality ──────────────────────────────────────────
51
+ code:
52
+ max_lines_per_file: 100 # Max lines in any source file
53
+ max_function_lines: 30 # Max lines per function
54
+ max_params: 4 # Max function parameters
55
+ no_any_types: true # Disallow TypeScript `any`
56
+ strict_mode: true # TypeScript strict mode
57
+ naming: camelCase # Naming convention (camelCase, snake_case, PascalCase)
58
+
59
+ # ── Testing ───────────────────────────────────────────────
60
+ testing:
61
+ unit_coverage: 90 # Minimum unit test coverage %
62
+ branch_coverage: 85 # Minimum branch coverage %
63
+ critical_path_coverage: 100 # Coverage for auth, payments, security
64
+ require_playwright_e2e: true # Require Playwright test for every feature
65
+ require_failing_test_first: true # Bug fixes must start with a failing test
66
+ test_naming: describe_it # Test naming style (describe_it, test_should)
67
+
68
+ # ── Security ──────────────────────────────────────────────
69
+ security:
70
+ block_on_critical: true # Block pipeline on critical vulnerabilities
71
+ block_on_high: true # Block pipeline on high vulnerabilities
72
+ require_input_validation: true # Require Zod/joi validation on all inputs
73
+ require_auth_on_routes: true # All API routes must check auth
74
+ no_secrets_in_code: true # Scan for hardcoded secrets
75
+ require_audit_logging: true # Auth events, admin actions must be logged
76
+
77
+ # ── Accessibility ─────────────────────────────────────────
78
+ accessibility:
79
+ wcag_level: AA # WCAG compliance level (A, AA, AAA)
80
+ require_aria_labels: true # All interactive elements need ARIA labels
81
+ min_contrast_ratio: 4.5 # Minimum color contrast ratio
82
+ require_keyboard_nav: true # All features must be keyboard accessible
83
+
84
+ # ── Design ────────────────────────────────────────────────
85
+ design:
86
+ style_guide: apple-hig # Design system (apple-hig, material, custom)
87
+ require_dark_mode: true # All UI must support dark mode
88
+ require_responsive: true # All pages must be responsive
89
+ max_z_index: 50 # Prevent z-index wars
90
+
91
+ # ── Git & Workflow ────────────────────────────────────────
92
+ workflow:
93
+ commit_style: conventional # Commit style (conventional, gitmoji, plain)
94
+ require_pr_review: true # PRs require code review
95
+ require_tests_pass: true # Tests must pass before commit
96
+ auto_changelog: true # Auto-generate changelog on release
97
+ branch_prefix: feature/ # Branch naming prefix
98
+
99
+ # ── Pipe Defaults ─────────────────────────────────────────
100
+ pipe:
101
+ default_before: rules # Always @before:rules on every pipe
102
+ default_after: test # Always @after:test on every pipe
103
+ fail_fast: true # Stop pipeline on first failure
104
+ max_loop_iterations: 10 # Safety cap for *? loops
105
+ require_approval_for_ship: true # Always approve before /ship
106
+
107
+ # ── AI ────────────────────────────────────────────────────
108
+ ai:
109
+ default_model: opus # Default AI model for agents
110
+ max_autonomous_iterations: 5 # Max iterations for /lam and /feature
111
+ require_review_on_ai_output: true # Auto-review AI-generated code
112
+
113
+ # ── File Patterns ─────────────────────────────────────────
114
+ patterns:
115
+ source_files: "src/**/*.{ts,tsx,js,jsx}"
116
+ test_files: "src/**/*.test.{ts,tsx}"
117
+ e2e_files: "e2e/**/*.e2e.test.ts"
118
+ ignore: ["node_modules", "dist", ".next", "coverage"]
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Commands
124
+
125
+ ### Initialize rules
126
+ ```
127
+ /config-rules init
128
+ ```
129
+ Creates `.luna/rules.yaml` with sensible defaults based on your codebase.
130
+
131
+ ### Set a rule
132
+ ```
133
+ /config-rules set max-lines 100
134
+ /config-rules set coverage 95
135
+ /config-rules set wcag-level AAA
136
+ /config-rules set commit-style conventional
137
+ /config-rules set require-playwright true
138
+ /config-rules set block-on-critical true
139
+ /config-rules set default-before rules
140
+ /config-rules set default-after test
141
+ /config-rules set require-approval-for-ship true
142
+ ```
143
+
144
+ ### Get a rule
145
+ ```
146
+ /config-rules get max-lines # 100
147
+ /config-rules get coverage # 90
148
+ /config-rules get wcag-level # AA
149
+ ```
150
+
151
+ ### List all rules
152
+ ```
153
+ /config-rules list
154
+ ```
155
+ Shows all active rules with current values.
156
+
157
+ ### Remove a rule
158
+ ```
159
+ /config-rules remove max-function-lines
160
+ ```
161
+
162
+ ### Export rules
163
+ ```
164
+ /config-rules export # Print rules.yaml to console
165
+ /config-rules export clipboard # Copy to clipboard
166
+ ```
167
+
168
+ ---
169
+
170
+ ## How Rules Auto-Apply
171
+
172
+ ### Every Luna Session
173
+ When you start any Luna command, rules are loaded from `.luna/rules.yaml`:
174
+ - `/go` respects `max_lines_per_file`, `no_any_types`, `strict_mode`
175
+ - `/rev` checks against all code quality and security rules
176
+ - `/test` enforces coverage thresholds
177
+ - `/ship` requires approval if `require_approval_for_ship: true`
178
+
179
+ ### Every Pipe
180
+ Pipe defaults from `rules.yaml` are injected automatically:
181
+ ```yaml
182
+ pipe:
183
+ default_before: rules
184
+ default_after: test
185
+ ```
186
+ This means:
187
+ ```
188
+ /pipe go *5 >> rev >> ship
189
+ ```
190
+ Automatically becomes:
191
+ ```
192
+ /pipe @before:rules @after:test go *5 >> rev >> approve "Ship?" >> ship
193
+ ```
194
+
195
+ ### Every Assert
196
+ Assertions read thresholds from rules:
197
+ ```
198
+ /pipe assert coverage # Uses testing.unit_coverage from rules.yaml
199
+ /pipe assert file-size # Uses code.max_lines_per_file from rules.yaml
200
+ /pipe assert security # Uses security.block_on_critical from rules.yaml
201
+ ```
202
+
203
+ ### AI Agents
204
+ AI agents respect:
205
+ ```yaml
206
+ ai:
207
+ default_model: opus
208
+ max_autonomous_iterations: 5
209
+ require_review_on_ai_output: true
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Rule Inheritance
215
+
216
+ Rules cascade:
217
+ ```
218
+ Portfolio CLAUDE.md (200-line cap, 90% coverage)
219
+ └── Project .luna/rules.yaml (100-line cap, 95% coverage) ← stricter, overrides
220
+ └── Session /rules (runtime overrides) ← strictest
221
+ ```
222
+
223
+ **Rules can only get stricter, never weaker.**
224
+
225
+ - Portfolio says 200 lines → project can set 100, not 300
226
+ - Portfolio says 90% coverage → project can set 95%, not 80%
227
+
228
+ ---
229
+
230
+ ## Team Sharing
231
+
232
+ `.luna/rules.yaml` is a regular file — commit it to git:
233
+
234
+ ```bash
235
+ git add .luna/rules.yaml
236
+ git commit -m "chore: set project rules — 100-line cap, 95% coverage"
237
+ ```
238
+
239
+ Everyone on the team gets the same rules automatically.
240
+
241
+ ---
242
+
243
+ ## Presets
244
+
245
+ ```
246
+ /config-rules init strict # Strictest settings
247
+ /config-rules init standard # Balanced defaults
248
+ /config-rules init startup # Fast-moving, fewer gates
249
+ ```
250
+
251
+ | Preset | Max Lines | Coverage | Security | Approval |
252
+ |--------|-----------|----------|----------|----------|
253
+ | `strict` | 80 | 95% | Block all | Required |
254
+ | `standard` | 100 | 90% | Block critical | Required |
255
+ | `startup` | 150 | 80% | Warn only | Optional |