fux-propose-rules

Drafts durable coding rules with rationale from diffs and git history for human ratification.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/arpitarya/fux --skill fux-propose-rules-arpitarya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fux-propose-rules
Source: https://github.com/arpitarya/fux/tree/main/archive/v0.1/fux/data/skills/propose-rules
Command: npx skills add https://github.com/arpitarya/fux --skill fux-propose-rules-arpitarya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams lose the reasoning behind coding conventions and invariants because the 'why' lives only in PR discussions and commit messages. This Skill automates the drafting of rules-with-why so knowledge is captured as drafts while humans keep final ratification control. ## Core Features & Use Cases - Forward capture: After a meaningful change or PR, the agent reads the diff, commit message, and session context to draft rules with their rationale into .fux/CANDIDATES.md. - Retroactive mining: Run $FUX propose-rules --retro to surface latent invariants from the AST and recover the why from git commit subjects, with no LLM cost. - Human-gated triage: Review drafts with fux candidates --pending, then accept or reject each one; constitutional rules are never auto-accepted and route through fux ratify. - Use Case: After merging a PR that switches lot accounting to average-cost, the agent drafts a convention rule citing PR #41 as the why, which a maintainer later ratifies. ## Quick Start Ask the agent to propose rules from the changes in your latest pull request and file them as drafts for review.

Frequently Asked Questions about fux-propose-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically capture coding conventions from a pull request?▼

Run the forward workflow after a meaningful change: the agent reads the diff, commit message, and session context, then files rule drafts via `fux propose-rules --from drafts.json`. Each draft includes the rule, its why, and code references.

How to document the reasoning behind legacy code decisions?▼

Use `fux propose-rules --retro` for a one-shot retroactive pass. The engine mines latent invariants from the AST and recovers the why from git commit subjects touching each site, with no LLM calls and bounded output.

Can proposed rules become active automatically?▼

No. Every proposal lands as `status: draft` and `tier: standard` in `.fux/CANDIDATES.md`. A human must run `fux candidates accept <id>` to activate it, and constitutional rules always route through `fux ratify` manually.

What happens when a rule has no recoverable rationale?▼

A genuine invariant with no written why is drafted with `invariant: true` and flagged `why: TODO`, sorted last as low-trust. A pure restatement of code with no invariant and no why is dropped entirely.

Does the retroactive mining require an LLM or API key?▼

No. The retroactive mode is pure engine work: AST-based invariant mining plus git commit subject analysis. It is deterministic, capped per run, deduplicated, and costs nothing in model tokens.