> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> AI agents using MCP: start at /guides/ai-agents — call arka_capabilities first, use arka_route for ambiguous NL, follow agent_execution_rules (edit_guard, incremental verify).
> Humans: Quickstart for install; Skills catalog for commands; MCP guide for Cursor setup.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Self-improve loop

> Arka अपनी codebase का विश्लेषण करता है, fixes प्रस्तावित करता है, और वैकल्पिक रूप से safety gates के साथ उन्हें लागू करता है।

**Self-improve** Arka को अपनी repository — tests, routing, docs — का निरीक्षण करने और एक improvement plan तैयार करने देता है। goal agent चलाने और fixes लागू करने के लिए `--apply` उपयोग करें।

## त्वरित शुरुआत

```bash theme={null}
arka self improve              # केवल plan (dry-run)
arka self improve routing      # केंद्रित plan
arka self improve --apply      # goal agent से लागू करें
arka self memory               # पिछले improvement प्रयास
arka self status               # repo + memory path
```

प्राकृतिक भाषा:

```bash theme={null}
arka improve arka
arka self improve routing
arka improve arka llm fallback
```

`self improve routing` को dedicated skill के रूप में भी route किया जाता है ताकि Arka routing fixes को first-class self-improvement task के रूप में treat कर सके।

## Output (normal mode)

```
━━━ Arka Self-Improve ━━━
Focus: routing
Checking: tests, routing, docs

✗ Tests: 1 failure (memory_detect)
✓ Routing: symbolic.py (40 route_* handlers)
○ Plan: fix import in tests/test_memory_detect.py

Next: arka self improve routing --apply
```

<Note>
  पूरी diagnostics (pytest traces, llm.txt context) केवल [debug mode](/hi/guides/operation-modes) में दिखती हैं।
</Note>

## Safety

| Rule                          | व्यवहार                                                                   |
| ----------------------------- | ------------------------------------------------------------------------- |
| Plan-only default             | बिना `--apply` कोई file writes नहीं                                       |
| `--apply` को agent mode चाहिए | `ask` या `plan` mode में blocked                                          |
| Secrets blocked               | कभी `.env`, credentials, `node_modules` को modify नहीं करता               |
| Memory                        | `~/.config/arka/self-improve-memory.json` पिछले प्रयासों को track करता है |

## संबंधित

* [Goal agent](/guides/goal-agent) — multi-step autonomous tasks
* [Testing](/guides/testing) — pytest और CI


## Related topics

- [Arka के साथ कोड कैसे लिखें](/hi/guides/code-with-arka.md)
- [Arka CLI command और flag reference](/hi/guides/cli.md)
- [13 जुलाई, 2026 का सप्ताह](/hi/changelog/2026-07-13.md)
- [Command aliases, subcommand synonyms, और skill नाम](/hi/reference/aliases.md)
- [Symbolic और LLM routing pipeline](/hi/concepts/routing.md)
