rules

SKILL.md

<tool_restrictions>

MANDATORY Tool Restrictions

REQUIRED TOOLS — use these, do not skip:

  • AskUserQuestion — REQUIRED for all user decisions (update confirmation, Ruler offer).

BANNED TOOLS — calling these is a skill violation:

  • EnterPlanMode — BANNED. Do NOT call this tool. This skill has its own structured process. Execute the steps below directly.
  • ExitPlanMode — BANNED. You are never in plan mode. </tool_restrictions>

───────────────────────────────────────────────────────────

Apply Arc's coding standards to the current project.

Step 1: Check for existing rules

Use Glob tool: .ruler/*.md

If .ruler/ does not exist: Go to Step 2 (Fresh Install)

If .ruler/ exists: Go to Step 3 (Update Flow)

Step 2: Fresh Install

Resolve the Arc install root from this skill's location and refer to it as ${ARC_ROOT} for the rest of this workflow.

Copy all rules from Arc to the project:

cp -r "${ARC_ROOT}/rules/" .ruler/

Tell the user:

Rules copied to .ruler/

Files added:
- stack.md, api.md, ai-sdk.md, cli.md, code-style.md, env.md, git.md, integrations.md, tooling.md
- nextjs.md, react.md, tailwind.md, testing.md
- turborepo.md, typescript.md, versions.md
- interface/ (animation, design, forms, interactions, layout, performance, typography)

Go to Step 4 (Offer Ruler)

Step 3: Update Flow

Existing .ruler/ found. Ask the user:

AskUserQuestion:
  question: "Found existing .ruler/ in this project. Update with Arc's latest rules? This will backup current rules and overwrite with Arc's latest. You can review changes with `git diff .ruler/` after."
  header: "Update Rules"
  options:
    - label: "Update rules"
      description: "Backup current rules to .ruler.backup-TIMESTAMP/ and overwrite with Arc's latest"
    - label: "Keep existing"
      description: "Keep your current rules unchanged"

If user picks "Update rules":

# Create backup
cp -r .ruler/ ".ruler.backup-$(date +%Y%m%d-%H%M%S)/"

# Copy fresh rules
rm -rf .ruler/
cp -r "${ARC_ROOT}/rules/" .ruler/

Tell the user:

Rules updated. Backup saved to .ruler.backup-YYYYMMDD-HHMMSS/

Review changes with: git diff .ruler/

Go to Step 4 (Offer Ruler)

If user picks "Keep existing":

Keeping existing rules. You can manually compare with Arc's rules at:
${ARC_ROOT}/rules/

Done.

Step 4: Offer Ruler

Ask the user:

AskUserQuestion:
  question: "Want to distribute rules to other AI agents (Copilot, Cursor, etc.) via Ruler?"
  header: "Distribute Rules"
  options:
    - label: "Run ruler apply"
      description: "Run npx ruler apply to distribute rules to other AI tools"
    - label: "Skip"
      description: "Keep rules in .ruler/ only, distribute later if needed"

If user picks "Run ruler apply":

npx ruler apply

If ruler is not installed (command fails):

Ruler not found. Rules are in .ruler/ and ready for use.

To distribute to other AI agents, install ruler:
  npm install -g ruler

Then run:
  npx ruler apply

If user picks "Skip":

Rules are ready in .ruler/. Run `npx ruler apply` later if you want to distribute to other agents.

Step 5: Suggest Linear (for complex projects)

After rules are set up, check project complexity:

# Count source files
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) | grep -v node_modules | wc -l

If >50 files or monorepo detected:

This looks like a complex project. Consider setting up Linear MCP for issue tracking:

1. Add to .mcp.json:
   {
     "mcpServers": {
       "linear": {
         "command": "npx",
         "args": ["-y", "@anthropic/linear-mcp"]
       }
     }
   }

2. Arc will then:
   - Query active issues in /arc:suggest
   - Create issues from /arc:audit findings
   - Link work to issues for context

See .ruler/tooling.md for details.

If small project: Skip this suggestion.

Done.

Weekly Installs
1
Repository
howells/arc
GitHub Stars
15
First Seen
3 days ago
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1